Logs on 2023-09-09 (liberachat/#haskell)
| 00:02:06 | → | sm joins (~sm@plaintextaccounting/sm) |
| 00:06:45 | × | sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 258 seconds) |
| 00:11:04 | → | aaronv joins (~aaronv@user/aaronv) |
| 00:15:51 | × | danza__ quits (~francesco@151.37.121.223) (Ping timeout: 248 seconds) |
| 00:23:41 | <hammond> | there is composition and there is also decomposition. |
| 00:24:28 | <hammond> | im reading refactoring and it's almost about breaking up large functions into smaller ones. |
| 00:32:47 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 00:35:47 | → | sm joins (~sm@plaintextaccounting/sm) |
| 00:37:21 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 00:38:49 | → | caryhartline joins (~caryhartl@168.182.58.169) |
| 00:40:23 | × | sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 248 seconds) |
| 00:42:03 | → | bilegeek joins (~bilegeek@2600:1008:b06c:4343:3be3:cb40:aeb0:813f) |
| 00:46:27 | → | JordiGH joins (~jordi@user/jordigh) |
| 00:47:39 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 00:48:18 | × | ddellacosta quits (~ddellacos@ool-44c738de.dyn.optonline.net) (Quit: WeeChat 4.0.3) |
| 00:48:23 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 00:49:04 | → | ddellacosta joins (~ddellacos@ool-44c738de.dyn.optonline.net) |
| 00:50:36 | × | Unode quits (~Unode@fg-ext-220.embl.de) (Server closed connection) |
| 00:50:49 | → | Unode joins (~Unode@fg-ext-220.embl.de) |
| 00:51:46 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 00:51:52 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 00:51:52 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 00:51:52 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:56:52 | → | Guest12 joins (~Guest12@187.83.249.216.dyn.smithville.net) |
| 01:10:20 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:29 | → | sm joins (~sm@plaintextaccounting/sm) |
| 01:14:00 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 01:14:21 | <segfaultfizzbuzz> | i asked google bard to make a lockfree DAG in haskell, and it piped back some code and then said "This data structure is lockfree because all of the operations are implemented using STM, which guarantees that they are thread-safe. " |
| 01:14:37 | <EvanR> | smart |
| 01:14:53 | <segfaultfizzbuzz> | jobs r safe right |
| 01:15:14 | <segfaultfizzbuzz> | if not maybe i should work on my ramen making skills or something |
| 01:16:08 | × | sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 258 seconds) |
| 01:16:20 | × | absence quits (torgeihe@hildring.pvv.ntnu.no) (Server closed connection) |
| 01:16:28 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:16:31 | → | absence joins (torgeihe@hildring.pvv.ntnu.no) |
| 01:18:55 | × | mysl quits (~mysl@user/mysl) (Quit: Lost terminal) |
| 01:19:51 | × | td_ quits (~td@i53870905.versanet.de) (Ping timeout: 248 seconds) |
| 01:21:52 | → | td_ joins (~td@i53870933.versanet.de) |
| 01:23:03 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 248 seconds) |
| 01:24:03 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 01:28:55 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 248 seconds) |
| 01:29:18 | × | libertyprime quits (~libertypr@203.96.203.44) (Ping timeout: 246 seconds) |
| 01:29:29 | → | sm joins (~sm@plaintextaccounting/sm) |
| 01:29:46 | _xor0 | is now known as _xor |
| 01:30:43 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 01:33:43 | × | sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 248 seconds) |
| 01:37:12 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 255 seconds) |
| 01:37:22 | × | todi quits (~todi@p4fd1ab34.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
| 01:37:50 | → | stackdroid18 joins (14094@de1.hashbang.sh) |
| 01:37:51 | → | todi joins (~todi@p5dca5c94.dip0.t-ipconnect.de) |
| 01:40:24 | → | libertyprime joins (~libertypr@203.96.203.44) |
| 01:50:15 | × | otto_s quits (~user@p5de2ff65.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 01:51:53 | → | otto_s joins (~user@p4ff27ce7.dip0.t-ipconnect.de) |
| 01:52:03 | × | stackdroid18 quits (14094@de1.hashbang.sh) (Quit: hasta la vista... tchau!) |
| 01:56:43 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 240 seconds) |
| 02:00:14 | → | aaronv joins (~aaronv@user/aaronv) |
| 02:03:07 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:03:07 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:03:07 | finn_elija | is now known as FinnElija |
| 02:04:05 | → | sm joins (~sm@plaintextaccounting/sm) |
| 02:04:18 | × | Guest12 quits (~Guest12@187.83.249.216.dyn.smithville.net) (Quit: Client closed) |
| 02:08:17 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 245 seconds) |
| 02:10:28 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 02:10:48 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1030:d66f:8de7:984f) (Remote host closed the connection) |
| 02:11:07 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1030:d66f:8de7:984f) |
| 02:13:38 | × | sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 258 seconds) |
| 02:13:45 | → | bratwurst joins (~blaadsfa@S010610561191f5d6.lb.shawcable.net) |
| 02:17:04 | → | ripspin joins (~chatzilla@1.145.242.125) |
| 02:17:08 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 02:20:28 | × | bratwurst quits (~blaadsfa@S010610561191f5d6.lb.shawcable.net) (Ping timeout: 248 seconds) |
| 02:20:36 | × | JordiGH quits (~jordi@user/jordigh) (Remote host closed the connection) |
| 02:22:32 | <monochrom> | No job is safe. |
| 02:23:32 | <monochrom> | Make no mistake. Just because you know that an LLM gives a wrong answer don't mean that your employer will agree with you. |
| 02:24:34 | <monochrom> | There is a reason flatearthers and antivaxxers exist. There is a reason homeopathy is actually profittable. |
| 02:26:24 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 02:26:42 | × | libertyprime quits (~libertypr@203.96.203.44) (Ping timeout: 246 seconds) |
| 02:26:49 | <monochrom> | Meanwhile science-based medical professionals are dropping out, indicating that they are not paid enough and so not even remotely close to being half profittable. |
| 02:26:59 | <monochrom> | Generally, if you are honest, your job is not safe. |
| 02:28:35 | × | Ranhir quits (~Ranhir@157.97.53.139) (Server closed connection) |
| 02:29:03 | → | Ranhir joins (~Ranhir@157.97.53.139) |
| 02:29:25 | × | waleee quits (~waleee@h-176-10-137-138.na.cust.bahnhof.se) (Ping timeout: 250 seconds) |
| 02:33:19 | × | thaumavorio quits (~thaumavor@thaumavor.io) (Quit: ZNC 1.8.2 - https://znc.in) |
| 02:33:29 | × | heath3 quits (~heath@user/heath) (Server closed connection) |
| 02:33:48 | → | heath3 joins (~heath@user/heath) |
| 02:34:31 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 02:34:37 | → | thaumavorio joins (~thaumavor@thaumavor.io) |
| 02:36:45 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 02:37:19 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 02:40:28 | → | Guest72 joins (~Guest72@24.42.148.102) |
| 02:41:37 | × | Guest72 quits (~Guest72@24.42.148.102) (Client Quit) |
| 02:44:35 | → | sm joins (~sm@plaintextaccounting/sm) |
| 02:48:54 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 02:50:20 | × | td_ quits (~td@i53870933.versanet.de) (Ping timeout: 246 seconds) |
| 02:52:29 | → | td_ joins (~td@i5387093E.versanet.de) |
| 02:52:57 | × | sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 246 seconds) |
| 03:02:52 | <EvanR> | unless you're tenured? |
| 03:03:13 | → | libertyprime joins (~libertypr@203.96.203.44) |
| 03:03:17 | <geekosaur> | they can revoke tenure |
| 03:03:50 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 03:08:27 | × | ddellacosta quits (~ddellacos@ool-44c738de.dyn.optonline.net) (Ping timeout: 258 seconds) |
| 03:10:17 | → | ddellacosta joins (~ddellacos@ool-44c738de.dyn.optonline.net) |
| 03:17:15 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 03:19:19 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 248 seconds) |
| 03:20:39 | <EvanR> | *they can't fire all of us* |
| 03:21:39 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 03:29:19 | <monochrom> | The bar for revoking tenure is extremely high. |
| 03:29:56 | <probie> | they just need to lower the bar first |
| 03:31:45 | <monochrom> | Academia moves much more slowly than industry about this. One of the rare cases that an echo chamber actually has benefits: the profs themselves make the rules, so of course they make the rules to favour their tenure keeping! |
| 03:32:34 | <monochrom> | Sadly politicians and parliaments work the same way. >:) |
| 03:32:35 | → | aforemny_ joins (~aforemny@2001:9e8:6cc4:ca00:285c:4ef6:5a4b:f825) |
| 03:32:51 | × | aforemny quits (~aforemny@i59F516ED.versanet.de) (Ping timeout: 246 seconds) |
| 03:34:31 | AmyMalik | is now known as MelanieMalik |
| 03:36:04 | <segfaultfizzbuzz> | can somebody please please get the programmers are also human guy to mock haskellers |
| 03:37:30 | <monochrom> | Space, the final delimiter. |
| 03:40:50 | <segfaultfizzbuzz> | not a bad start |
| 03:41:05 | <segfaultfizzbuzz> | these are the voyages of the typesafe enterprise? |
| 03:49:35 | × | hiredman quits (~hiredman@frontier1.downey.family) (Server closed connection) |
| 04:01:35 | × | GoldsteinQ quits (~goldstein@goldstein.rs) (Server closed connection) |
| 04:01:55 | → | captnemo joins (~captnemo@193.32.127.239) |
| 04:01:55 | → | GoldsteinQ joins (~goldstein@goldstein.rs) |
| 04:01:58 | × | captnemo quits (~captnemo@193.32.127.239) (Client Quit) |
| 04:04:23 | × | bilegeek quits (~bilegeek@2600:1008:b06c:4343:3be3:cb40:aeb0:813f) (Quit: Leaving) |
| 04:11:35 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 248 seconds) |
| 04:13:00 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 04:17:59 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 04:21:17 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 04:31:51 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 04:33:21 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 250 seconds) |
| 04:43:01 | × | seeg123456 quits (~seeg12345@64.176.64.83) (Quit: Gateway shutdown) |
| 04:43:02 | → | robobub joins (uid248673@id-248673.uxbridge.irccloud.com) |
| 04:50:13 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 240 seconds) |
| 04:53:32 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 04:54:06 | → | sm joins (~sm@plaintextaccounting/sm) |
| 04:55:46 | × | migas6 quits (~migas@astra4961.startdedicated.net) (Quit: Ping timeout (120 seconds)) |
| 04:56:04 | → | migas joins (~migas@astra4961.startdedicated.net) |
| 04:57:42 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 255 seconds) |
| 04:57:45 | × | hgolden quits (~hgolden@2603-8000-9d00-3ed1-fc05-5499-f77c-fbe5.res6.spectrum.com) (Remote host closed the connection) |
| 05:01:44 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 05:03:01 | → | erty joins (~user@user/aeroplane) |
| 05:04:06 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:07:50 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 05:08:44 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Read error: Connection reset by peer) |
| 05:09:29 | → | hgolden joins (~hgolden@2603-8000-9d00-3ed1-fc05-5499-f77c-fbe5.res6.spectrum.com) |
| 05:14:23 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 05:14:51 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 05:17:45 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 05:19:20 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 05:23:52 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 05:24:46 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Read error: Connection reset by peer) |
| 05:27:45 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 05:30:06 | → | hiredman joins (~hiredman@frontier1.downey.family) |
| 05:30:54 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 05:31:41 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 246 seconds) |
| 05:31:46 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Read error: Connection reset by peer) |
| 05:32:06 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 255 seconds) |
| 05:34:14 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 05:37:54 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 05:40:07 | × | libertyprime quits (~libertypr@203.96.203.44) (Ping timeout: 248 seconds) |
| 05:41:47 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 05:47:55 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 05:48:48 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Read error: Connection reset by peer) |
| 05:49:05 | → | aaronv joins (~aaronv@user/aaronv) |
| 05:51:19 | × | aaronv quits (~aaronv@user/aaronv) (Client Quit) |
| 05:51:54 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 05:54:55 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 05:55:48 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 06:01:31 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 06:01:55 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 06:02:49 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 06:04:49 | → | idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 06:06:06 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 255 seconds) |
| 06:08:56 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 06:09:50 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 06:15:57 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 06:16:45 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 06:16:50 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 06:20:02 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 06:22:57 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 06:31:51 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 06:34:34 | × | caryhartline quits (~caryhartl@168.182.58.169) (Quit: caryhartline) |
| 06:37:58 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 06:38:15 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 06:43:51 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 06:49:58 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 06:50:52 | × | tstat quits (~tstat@user/tstat) (Server closed connection) |
| 06:51:11 | → | tstat joins (~tstat@user/tstat) |
| 06:53:33 | → | acidjnk joins (~acidjnk@p200300d6e7072f47b0cfe67efeb6b056.dip0.t-ipconnect.de) |
| 06:54:03 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 06:56:34 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 06:56:37 | × | ripspin quits (~chatzilla@1.145.242.125) (Remote host closed the connection) |
| 06:57:46 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 07:02:24 | → | sm joins (~sm@plaintextaccounting/sm) |
| 07:06:23 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 07:09:50 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 07:10:10 | × | ent quits (entgod@kapsi.fi) (Server closed connection) |
| 07:10:24 | → | ent joins (entgod@kapsi.fi) |
| 07:11:19 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 07:13:24 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 07:13:47 | → | coot joins (~coot@89-69-206-216.dynamic.chello.pl) |
| 07:16:26 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 07:17:05 | → | fendor joins (~fendor@2a02:8388:1640:be00:c785:45ab:c70:9d3f) |
| 07:17:59 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 07:21:12 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 07:22:20 | <carbolymer> | any ideas how to shrink OpenUnion into a narrower list of types? https://stackoverflow.com/questions/77071242/how-to-shrink-an-union-type-in-haskell |
| 07:22:59 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 07:23:14 | → | Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) |
| 07:26:47 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 07:27:01 | <probie> | carbolymer: does it have to have that exact type signature? |
| 07:28:39 | → | jackneill__ joins (~Jackneill@20014C4E1E101A00392465011B960A73.dsl.pool.telekom.hu) |
| 07:29:18 | <carbolymer> | probie: nah, just shrinked union |
| 07:29:30 | <carbolymer> | probie: I guess that constraint is a formality |
| 07:29:46 | <carbolymer> | maybe redundant |
| 07:32:10 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 07:36:10 | <lisbeths> | None of the lambda calculus exercises on codewars are in pure lambda calculus |
| 07:36:15 | <lisbeths> | it is upsetting |
| 07:36:54 | <lisbeths> | these exercises should use the church encoding |
| 07:37:41 | <lisbeths> | they are just ordinary haskell exercised with *extra* lambdas |
| 07:38:46 | × | idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.2) |
| 07:43:18 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 07:44:55 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 248 seconds) |
| 07:51:54 | <probie> | carbolymer: https://paste.tomsmeding.com/KvbVvfWS should do the job (if at the point of use all types are known) |
| 07:54:12 | <carbolymer> | probie: looks good. Thanks a lot! I'll try it out later! |
| 07:59:58 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 08:04:16 | → | CiaoSen joins (~Jura@2a05:5800:2b2:1b00:664b:f0ff:fe37:9ef) |
| 08:08:36 | → | _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
| 08:10:27 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 08:15:40 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 08:15:52 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 08:21:18 | <[Leary]> | lisbeths: That's upsetting indeed! I wrote up a bunch of LC exercises a few years back but never got around to putting them anywhere---if that changes any time soon, I'll send you a link. They're not very inventive though, mostly just building basic tools with which to build slightly less basic tools. |
| 08:22:52 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 08:27:19 | × | neptun quits (neptun@2607:5300:60:5910:dcad:beff:feef:5bc) (Server closed connection) |
| 08:27:33 | → | neptun joins (neptun@2607:5300:60:5910:dcad:beff:feef:5bc) |
| 08:27:35 | → | gmg joins (~user@user/gehmehgeh) |
| 08:29:28 | → | emmanuelux joins (~emmanuelu@user/emmanuelux) |
| 08:29:38 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 08:32:54 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 08:33:48 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 244 seconds) |
| 08:48:27 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 08:51:32 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 08:52:26 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 08:53:13 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 08:53:23 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 08:53:54 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 09:09:29 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 09:09:48 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 09:12:20 | → | mrmr15 joins (~mrmr@user/mrmr) |
| 09:12:44 | × | mrmr1 quits (~mrmr@user/mrmr) (Read error: Connection reset by peer) |
| 09:12:44 | mrmr15 | is now known as mrmr1 |
| 09:14:17 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 09:17:00 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 09:19:14 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 09:20:35 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1030:d66f:8de7:984f) (Remote host closed the connection) |
| 09:22:02 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 09:23:12 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 09:23:28 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 258 seconds) |
| 09:33:31 | <albet70> | there's too few articles about alex and happy, is there a good tutorial about them? |
| 09:39:34 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 09:40:43 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 09:41:54 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 09:42:09 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 09:48:46 | <Rembane> | albet70: I've only seen a "this is how you get started"-article. |
| 09:50:30 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 09:53:15 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1030:d66f:8de7:984f) |
| 09:54:16 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 09:54:16 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 09:58:33 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 246 seconds) |
| 10:01:18 | ← | erty parts (~user@user/aeroplane) (ERC 5.4 (IRC client for GNU Emacs 28.2)) |
| 10:04:38 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 10:12:05 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 10:13:31 | → | mysl joins (~mysl@user/mysl) |
| 10:15:16 | → | elevenkb joins (~elevenkb@105.226.98.41) |
| 10:15:28 | × | elevenkb quits (~elevenkb@105.226.98.41) (Client Quit) |
| 10:16:42 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Ping timeout: 246 seconds) |
| 10:17:16 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 10:18:01 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 10:24:23 | × | CiaoSen quits (~Jura@2a05:5800:2b2:1b00:664b:f0ff:fe37:9ef) (Ping timeout: 248 seconds) |
| 10:29:38 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 10:37:00 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 255 seconds) |
| 10:38:39 | <dminuoso> | institor: Never underestimate the importance of cache, indeed. |
| 10:38:47 | <dminuoso> | Oh. I was scrolled back a few days it seems! |
| 10:39:14 | <carbolymer> | keep em conversations going |
| 10:40:30 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 10:44:20 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 10:44:23 | × | emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 10:44:50 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 246 seconds) |
| 10:45:27 | → | RSCASTILHO joins (~RSCASTILH@187.40.124.54) |
| 10:47:19 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 10:49:22 | × | RSCASTILHO quits (~RSCASTILH@187.40.124.54) () |
| 10:50:16 | × | todi quits (~todi@p5dca5c94.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 10:51:34 | → | todi joins (~todi@p5dca5c94.dip0.t-ipconnect.de) |
| 10:56:17 | × | tv quits (~tv@user/tv) (Quit: derp) |
| 10:56:33 | → | tv joins (~tv@user/tv) |
| 11:04:10 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 11:05:45 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 11:10:30 | × | tomboy65 quits (~tomboy64@user/tomboy64) (Ping timeout: 255 seconds) |
| 11:10:47 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 11:11:22 | × | siers quits (~ij@user/ij) (Server closed connection) |
| 11:11:43 | → | siers joins (~ij@user/ij) |
| 11:17:16 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 11:17:28 | × | coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
| 11:18:12 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 11:20:21 | → | _leo___ joins (~emmanuelu@user/emmanuelux) |
| 11:21:50 | → | tomboy64 joins (~tomboy64@user/tomboy64) |
| 11:22:13 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 11:22:54 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 246 seconds) |
| 11:22:59 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Ping timeout: 246 seconds) |
| 11:26:51 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 11:30:54 | → | sm joins (~sm@plaintextaccounting/sm) |
| 11:31:31 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 11:31:37 | × | sm quits (~sm@plaintextaccounting/sm) (Client Quit) |
| 11:35:04 | × | phma quits (~phma@2001:5b0:210f:2a18:ec08:5fa6:cd25:140c) (Read error: Connection reset by peer) |
| 11:35:41 | <[exa]> | albet70: tbh I didn't see much good ones, but I'd expect a lot of articles about flex&bison would port quite easily |
| 11:35:47 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 245 seconds) |
| 11:39:35 | → | dcoutts joins (~duncan@82-69-94-207.dsl.in-addr.zen.co.uk) |
| 11:41:24 | × | sefidel quits (~sefidel@user/sefidel) (Remote host closed the connection) |
| 11:42:02 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 11:42:10 | → | sefidel joins (~sefidel@user/sefidel) |
| 11:43:22 | → | coot joins (~coot@89-69-206-216.dynamic.chello.pl) |
| 11:44:02 | <carbolymer> | probie: works, thanks a lot! |
| 11:44:10 | → | phma joins (~phma@2001:5b0:2144:6b88:455e:8c61:7388:36ab) |
| 11:45:20 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 11:45:33 | × | _leo___ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 12:00:15 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 12:04:54 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 12:05:29 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 12:05:48 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 12:19:53 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 12:22:41 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 12:23:53 | → | _leo___ joins (~emmanuelu@user/emmanuelux) |
| 12:24:47 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 12:26:52 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Ping timeout: 248 seconds) |
| 12:27:00 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 255 seconds) |
| 12:31:35 | × | conjunctive quits (sid433686@id-433686.helmsley.irccloud.com) (Server closed connection) |
| 12:31:45 | → | conjunctive joins (sid433686@id-433686.helmsley.irccloud.com) |
| 12:34:18 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Tschüss) |
| 12:37:17 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 12:38:13 | × | Taneb quits (~Taneb@2001:41c8:51:10d:aaaa:0:aaaa:0) (Server closed connection) |
| 12:38:27 | → | Taneb joins (~Taneb@runciman.hacksoc.org) |
| 12:44:30 | → | Guest13 joins (~Guest17@49.140.189.123) |
| 12:45:50 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 12:47:27 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 12:48:36 | × | _leo___ quits (~emmanuelu@user/emmanuelux) (Ping timeout: 255 seconds) |
| 13:00:45 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 13:01:11 | × | Guest13 quits (~Guest17@49.140.189.123) (Quit: Client closed) |
| 13:03:45 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 13:05:33 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 13:10:56 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 13:11:19 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 13:12:58 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 13:12:58 | × | ezzieygu1wuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 258 seconds) |
| 13:14:57 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 13:16:36 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 13:17:11 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 248 seconds) |
| 13:19:35 | × | Adeon quits (sid418992@id-418992.lymington.irccloud.com) (Server closed connection) |
| 13:19:44 | → | Adeon joins (sid418992@id-418992.lymington.irccloud.com) |
| 13:19:54 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 13:20:15 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 13:28:49 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 13:29:14 | → | nvaxplus joins (~nvaxplus@user/nvaxplus) |
| 13:32:00 | <nvaxplus> | join #offtopia |
| 13:32:04 | ← | nvaxplus parts (~nvaxplus@user/nvaxplus) () |
| 13:34:03 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 13:34:30 | × | stites quits (~stites@130.44.147.204) (Ping timeout: 246 seconds) |
| 13:35:19 | → | stites joins (~stites@2607:fb91:dc6:4800:fbd5:4720:a3b4:a0d2) |
| 13:37:25 | <carbolymer> | no |
| 13:37:30 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 13:37:49 | → | _leo___ joins (~emmanuelu@user/emmanuelux) |
| 13:38:09 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 13:42:15 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 13:44:31 | → | mjs2600_ joins (~mjs2600@c-174-169-225-239.hsd1.vt.comcast.net) |
| 13:44:36 | × | mjs2600 quits (~mjs2600@c-174-169-225-239.hsd1.vt.comcast.net) (Read error: Connection reset by peer) |
| 13:44:41 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 13:44:59 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 13:45:48 | × | mysl quits (~mysl@user/mysl) (Ping timeout: 248 seconds) |
| 13:47:38 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 13:47:56 | → | mysl joins (~mysl@user/mysl) |
| 13:48:50 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 13:52:00 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 246 seconds) |
| 13:52:54 | → | ripspin joins (~chatzilla@1.145.231.215) |
| 13:52:55 | → | CiaoSen joins (~Jura@2a05:5800:2b2:1b00:664b:f0ff:fe37:9ef) |
| 13:53:31 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving) |
| 13:53:45 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 13:56:49 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 13:58:47 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds) |
| 14:00:43 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 14:01:54 | × | Buliarous quits (~gypsydang@46.232.210.139) (Server closed connection) |
| 14:02:03 | → | Buliarous joins (~gypsydang@46.232.210.139) |
| 14:02:31 | × | jespada quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com) |
| 14:03:03 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 248 seconds) |
| 14:03:41 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 14:04:47 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 14:05:16 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 14:05:32 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 14:07:34 | × | _leo___ quits (~emmanuelu@user/emmanuelux) (Ping timeout: 244 seconds) |
| 14:09:31 | <glguy> | albet70: I don't know any articles but I have examples. What kinds of things are you looking to learn if an article did exist? |
| 14:12:12 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 14:17:15 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 14:17:59 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 14:23:06 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 14:24:21 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:28:43 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 14:31:03 | × | Natch quits (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Read error: Connection reset by peer) |
| 14:31:33 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 14:31:48 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 14:32:54 | → | blomberg joins (~default_u@59.99.23.99) |
| 14:33:00 | <blomberg> | hi |
| 14:33:18 | <blomberg> | i can't change my list as a database issue |
| 14:33:18 | <glguy> | Hi |
| 14:33:28 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 14:33:29 | <blomberg> | i prefer using list as a db |
| 14:33:48 | <blomberg> | i don't have a literal db ofc, just a thought exercise |
| 14:34:24 | <blomberg> | i have a list of flowers and their characteristics , say in a database in a list ,,now how to change them. |
| 14:34:40 | <blomberg> | now i need mutation? |
| 14:35:19 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 14:35:27 | <probie> | Return a new list with changed items |
| 14:36:25 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 14:36:35 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 14:37:02 | <geekosaur> | monads sound scary but are actually quite simple |
| 14:37:05 | <geekosaur> | whoops |
| 14:37:20 | <geekosaur> | focus not following eyes… |
| 14:38:27 | <[exa]> | blomberg: why not have a `Map String SomeCharacteristic` or so? lists ain't very good for storing "named" information |
| 14:40:54 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 250 seconds) |
| 14:41:31 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 14:42:18 | <blomberg> | [exa]:list can storing arbitrary info using nesting |
| 14:43:06 | <blomberg> | probie: l has changed then? |
| 14:44:25 | <blomberg> | probie:how can i just return a new list and not save it in a variable; l=f();now i returned the new list but l has changed |
| 14:44:37 | <[exa]> | blomberg: is it still going to type well with arbitrary nesting? |
| 14:44:48 | <mauke> | are you in the right channel? |
| 14:45:18 | <blomberg> | geekosaur: so we need monads for that. mauke type what |
| 14:45:40 | <blomberg> | changing a list is my problem |
| 14:45:49 | <mauke> | no, it isn't |
| 14:46:01 | <blomberg> | database always changes |
| 14:46:07 | <blomberg> | but list=db |
| 14:46:12 | <geekosaur> | blomberg, my comment was intended for elsewhere and not related to your question |
| 14:46:21 | <mauke> | is this python? |
| 14:46:46 | <[exa]> | blomberg: what does your app look like now? |
| 14:46:53 | <blomberg> | i am asking what's the haskell way |
| 14:47:08 | <mauke> | stop trying to change things |
| 14:47:22 | <blomberg> | to change variables list |
| 14:47:40 | <geekosaur> | passing the list around to where it's needed, instead of using mutable variables. (you can get mutable variables in IO or ST but you usually don't actually need them) |
| 14:47:48 | <blomberg> | but db changes with time; it's not my fault |
| 14:47:56 | <[exa]> | blomberg: you can just replace the item |
| 14:48:03 | <blomberg> | how |
| 14:48:04 | <mauke> | there is no time, either |
| 14:48:09 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 14:48:16 | <[exa]> | blomberg: typically you would have a list with [("flower1", something), ("flower2", something_else)] |
| 14:48:45 | <geekosaur> | monads make that passing easier but are not necessary |
| 14:48:48 | <[exa]> | blomberg: then there are nice functions for removing e.g. the "flower2" entry from the list and adding another |
| 14:48:51 | <geekosaur> | (specifically State) |
| 14:49:33 | <[exa]> | blomberg: and you keep the changing list together with your code structure all the time, so that you don't need the mutability |
| 14:50:20 | <blomberg> | [exa]:"keep changing list together" - what is meant |
| 14:51:05 | <[exa]> | blomberg: that you don't make a "global variable" with the list but pass it around as it changes |
| 14:51:40 | <blomberg> | geekosaur: how can i pass the list around to where it's neeeded - it now has a variable name reference attached to it |
| 14:52:02 | <mauke> | ? ?? |
| 14:52:28 | <blomberg> | "pass it around" is too vague |
| 14:52:37 | → | Natch joins (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) |
| 14:52:38 | <mauke> | why? |
| 14:52:59 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 14:53:11 | <blomberg> | because i can't read their minds mauke |
| 14:53:45 | <mauke> | what does it mean to attach "a varaible name reference"? |
| 14:54:28 | <blomberg> | mauke: a global variable is the name attached to it; so how can i avoid that using passing it around |
| 14:54:45 | <mauke> | why do you have a global variable? |
| 14:54:48 | <mauke> | use a local variable |
| 14:55:21 | <blomberg> | hmm |
| 14:55:58 | <mauke> | and pass it to functions as a parameter |
| 14:56:10 | <geekosaur[c]> | You do things in functions. Instead of mutable variables you have function parameters that change with each call, and a result that likewise changes. So your list is a parameter |
| 14:56:12 | <blomberg> | ok then where will i store the list, and access it? access is global |
| 14:56:34 | <mauke> | access is not global |
| 14:56:44 | <mauke> | access is wherever you access it, which is a specific point in your code |
| 14:57:20 | <blomberg> | so the flower list is in a function ?? now it's inside i can't scope is different |
| 14:58:15 | <blomberg> | it's a storage issue it's not transient that i can pass it to a function and then just get a return value, because of storage and access |
| 14:58:19 | → | _leo___ joins (~emmanuelu@user/emmanuelux) |
| 14:58:47 | <mauke> | you're not making sense |
| 14:58:52 | <blomberg> | flower is a name that is accessible in global scope, that's the problem, if it's inside funcTION I CANT |
| 14:58:59 | <mauke> | exactly |
| 14:59:04 | <mauke> | that's not a problem, that's the solution |
| 14:59:08 | <mauke> | stop using a global variable |
| 14:59:25 | <mauke> | if a function needs access to it, pass it as a parameter |
| 14:59:30 | <blomberg> | yes i will then`I LOST FLOWER VARIABLE |
| 14:59:36 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 14:59:42 | <mauke> | how are you losing parameters? |
| 15:00:15 | <blomberg> | ? because parameters need to be fed via global variables |
| 15:00:22 | <mauke> | that makes no sense |
| 15:00:24 | <mauke> | > (\thing -> "the thing is " <> show thing) 42 |
| 15:00:25 | <lambdabot> | "the thing is 42" |
| 15:01:16 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Ping timeout: 250 seconds) |
| 15:01:22 | × | stites quits (~stites@2607:fb91:dc6:4800:fbd5:4720:a3b4:a0d2) (Read error: Connection reset by peer) |
| 15:01:41 | → | stites joins (~stites@130.44.147.204) |
| 15:02:48 | <blomberg> | 42 is not the "name" |
| 15:03:07 | <mauke> | true, but irrelevant |
| 15:03:15 | <blomberg> | bro what if i have a database of flowers then how it's a value |
| 15:03:27 | <mauke> | I don't know; that was your idea |
| 15:03:39 | <blomberg> | look i explained to you the problem 10 times, and you are beggining to troll me |
| 15:03:44 | <mauke> | > (\thing -> "the thing is " <> show thing) ["daisy", "daisy", "rose"] |
| 15:03:46 | <lambdabot> | "the thing is [\"daisy\",\"daisy\",\"rose\"]" |
| 15:03:57 | <mauke> | here's a list of flowers |
| 15:03:58 | <mauke> | or "database" |
| 15:04:16 | <blomberg> | yes that's a value that's a value and i can get a new value out |
| 15:04:25 | <blomberg> | i know that |
| 15:04:31 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 15:05:20 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 15:05:25 | <blomberg> | but my database variable is flower ??? and that's a name, so name is static but the values are changing |
| 15:05:31 | <blomberg> | that's the problem |
| 15:05:34 | <mauke> | it can't be changing |
| 15:05:37 | <mauke> | this is haskell |
| 15:05:59 | <mauke> | "how do I do the thing that is impossible?" is not a sensible question |
| 15:06:01 | <blomberg> | looks like you have not thought and don't care about real life |
| 15:06:33 | <blomberg> | "how do i avoid the mutation in a db list" - is a sensible one |
| 15:06:35 | <mauke> | I know, real life is all about flower databases and lists that magically change values |
| 15:07:00 | <[exa]> | blomberg: haskell was explicitly designed to avoid changey things when programming, to reach better goals. There are ways to do that (e.g. State monad) but these still just simulate the changes in immutable environment |
| 15:07:33 | <mauke> | if you start with a global variable like 'flowers = [...]', there's nowhere to go |
| 15:07:56 | <geekosaur> | blomberg, you are fixated on a single model for databases. there are other models that you are steadfastly refusing to consider |
| 15:08:10 | <blomberg> | mauke: yes, so where should i "store" the "value" |
| 15:08:32 | <[exa]> | blomberg: to store the value, you create a list that contains the value |
| 15:08:32 | <[exa]> | done |
| 15:08:36 | <mauke> | blomberg: I already told you |
| 15:08:43 | <mauke> | and you said I was trolling |
| 15:08:48 | <mauke> | so ... :shrug: |
| 15:09:19 | <[exa]> | blomberg: btw what's your previous programming language? (it might be easier to bridge this from a common ground) |
| 15:09:22 | <blomberg> | you said store inside local variable inside a function, now it's gone! function terminated |
| 15:09:27 | × | iteratee quits (~kyle@162.218.222.207) (Server closed connection) |
| 15:09:31 | <blomberg> | [exa]:python |
| 15:09:33 | <[exa]> | blomberg: it's not gone if the function returns it |
| 15:09:37 | → | iteratee joins (~kyle@162.218.222.207) |
| 15:09:59 | <[exa]> | ah nice. you can do the same in python without ever using a global variable |
| 15:10:21 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 15:10:34 | <blomberg> | [exa]: but .... i want to be able to type flower as a user and get the db, all i got is the value |
| 15:10:44 | <blomberg> | their is no reference |
| 15:10:52 | <blomberg> | via name |
| 15:10:53 | <mauke> | haskell doesn't have references |
| 15:10:57 | <geekosaur> | in xmonad, we pass the global state (XState) everywhere, using the State monad to simplify the code but it can be done without, just always pass the state as a parameter and return the new state as a result |
| 15:10:59 | <[exa]> | that's good, references are shady |
| 15:11:25 | <[exa]> | technically the "flower" name is the reference |
| 15:11:33 | <[exa]> | because it allows you to both reach your value, and change it |
| 15:11:37 | <mauke> | <blomberg> you said store inside local variable inside a function, now it's gone! function terminated <- so don't have the function terminate |
| 15:12:03 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:12:07 | <[exa]> | good approach too ^ |
| 15:12:28 | <mauke> | returning is optional |
| 15:14:59 | × | coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
| 15:16:08 | <blomberg> | how is returning optional |
| 15:16:41 | <mauke> | just ... don't |
| 15:16:48 | <blomberg> | example |
| 15:16:52 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 15:17:16 | <mauke> | > let foo n = foo (n + 1) in foo 0 |
| 15:17:23 | <lambdabot> | mueval-core: Time limit exceeded |
| 15:17:58 | <mauke> | > let foo flowers = foo ("daisy" : flowers) in foo [] |
| 15:18:06 | <lambdabot> | mueval-core: Time limit exceeded |
| 15:18:06 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:18:08 | <mauke> | (pushing daisies) |
| 15:18:20 | <[exa]> | blomberg: here try this example: https://paste.tomsmeding.com/TE0UxL1b -- a complete listy database with user commands |
| 15:18:35 | <[exa]> | you can enter stuff like "set flower 10" and "get flower" |
| 15:19:06 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds) |
| 15:19:51 | <[exa]> | blomberg: btw haskell has no stack that would overflow; actually if you have a function that doesn't return, calling it causes the information about the caller to disappear because it's no longer needed |
| 15:19:56 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 15:20:05 | <[exa]> | blomberg: so calling infinitely is perfectly OK and quite useful |
| 15:21:18 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 15:21:41 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 15:21:47 | × | _leo___ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 15:21:58 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 244 seconds) |
| 15:22:09 | <blomberg> | are you talking about mauke code or some other |
| 15:22:34 | <[exa]> | blomberg: check the link I posted |
| 15:22:42 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 15:24:12 | <[exa]> | segfaultfizzbuzz: re STG stuff we talked some time ago, I wanted to make the stuff clear for myself so actually implemented a tiny thing here https://gitea.blesmrt.net/exa/uskel |
| 15:24:33 | <segfaultfizzbuzz> | [exa]: awesome |
| 15:24:46 | <[exa]> | it is "spineful" but the only difference from spineless is that the "case" thunks and argument packs would be cared of by another stack |
| 15:24:55 | <[exa]> | and I don't want to manage that stuff in assembly |
| 15:25:00 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 15:25:36 | <[exa]> | especially not when the x86 push instruction is SO NICELY abused for making thunkgs |
| 15:26:02 | <[exa]> | and also no gc yet which is what I wanted to try next :D |
| 15:26:50 | <blomberg> | [exa]:will the paste link expire when? |
| 15:26:50 | <segfaultfizzbuzz> | nice,... |
| 15:27:09 | <segfaultfizzbuzz> | i probably can't understand the assembly but i will try to read it |
| 15:27:21 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:28:40 | <blomberg> | [exa]:when you said calling infinitenly is perfectly ok, did you mean your code or just plain infinite recursion |
| 15:28:45 | × | Everything quits (~Everythin@static.208.206.21.65.clients.your-server.de) (Server closed connection) |
| 15:28:54 | → | Everything joins (~Everythin@static.208.206.21.65.clients.your-server.de) |
| 15:29:26 | <[exa]> | blomberg: plain infinite recursion -- as long as your memory use stays checked, you can recurse as much as you want |
| 15:30:24 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 15:31:40 | <segfaultfizzbuzz> | i don't even know how to read this |
| 15:31:51 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 15:31:56 | <segfaultfizzbuzz> | unfortunately |
| 15:32:28 | <segfaultfizzbuzz> | i see like .thunkcode apply |
| 15:32:34 | <[exa]> | segfaultfizzbuzz: ok in short, I use %rbp as "pointer to current thunk" and %rsi as "continuation argument". Because I don't have the spiney stack, there are 2 "kinds" of thunk, one kind is the normal one as in haskell (you jump to its code with %rbp pointing to it, it will evaluate, change itself in place, and jump to the continuation you gave it in %rsi), the other kind is a "case" thunk which expects a |
| 15:32:40 | <[exa]> | forced value so that it can continue the computation (this comes in %rsi instd. of the continuation) |
| 15:34:31 | <segfaultfizzbuzz> | i am looking at for example .thunkcode apply |
| 15:35:11 | <[exa]> | segfaultfizzbuzz: this is a good starter https://gitea.blesmrt.net/exa/uskel/src/branch/master/print_123.s it makes 2 integer values for 100 (address goes to %r11) and 23 (address saved to %r12), then it makes a thunk that would add the 2 values (addr in %r11), another thunk that would print the result, and starts the evaluation with %rsi ("continuation" in this case) pointing to something that will exit |
| 15:35:11 | <segfaultfizzbuzz> | i guess apply is a program counter or something? i don't really read asm |
| 15:35:17 | <[exa]> | the process |
| 15:35:53 | <segfaultfizzbuzz> | i don't understand how "function arguments" work here |
| 15:35:58 | <[exa]> | the .thunkcode is a macro that wraps the code with a few annotation values that are used for guessing the thunk types (and would later be used for the GC) |
| 15:36:27 | <blomberg> | 7 |
| 15:36:39 | <segfaultfizzbuzz> | there are no function arguments in this, everything is passed through the registers, i think? |
| 15:36:43 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 15:36:44 | <[exa]> | https://gitea.blesmrt.net/exa/uskel/src/branch/master/print_123.s#L17 -- e.g. this says "make me a thunk that computes function plus, 2 arguments, argument addresses are now in r11 and r12, and save the resulting thunk address to r11" |
| 15:36:49 | <segfaultfizzbuzz> | that or you have to manually set memory addresses...? |
| 15:37:08 | <[exa]> | yeah all arguments and everything are in addresses |
| 15:37:33 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 15:37:39 | <[exa]> | and when evaluating a thunk, you can "see" all off your arguments by examining the thunk |
| 15:37:43 | <segfaultfizzbuzz> | $plus is ... a string or a type defined somewhere or something? |
| 15:37:54 | <blomberg> | [exa]: send me more code to change the db and update it |
| 15:38:05 | <[exa]> | blomberg: left out for the reader as an exercise |
| 15:38:19 | <blomberg> | set rm get dump cmd [exa] ok |
| 15:38:44 | <blomberg> | but exercise is good , not my haskell |
| 15:38:59 | <blomberg> | i don't even know what is <> in mauke code |
| 15:39:11 | <[exa]> | blomberg: btw not sure about the timeout I put on my paste |
| 15:39:14 | <[exa]> | better save it |
| 15:39:20 | <[exa]> | <> is a monoid glue |
| 15:39:27 | <[exa]> | > "a" <> "b" |
| 15:39:28 | <lambdabot> | "ab" |
| 15:39:44 | <[exa]> | > ["a"] <> ["b"] |
| 15:39:45 | <lambdabot> | ["a","b"] |
| 15:39:49 | <[exa]> | glues stuff together |
| 15:40:08 | <[exa]> | segfaultfizzbuzz: $plus is the address of the plus thunk code |
| 15:40:10 | <blomberg> | > (\thing -> "the thing is " <> show thing) ["daisy", "diasy", "rose] |
| 15:40:12 | <lambdabot> | <hint>:1:69: error: |
| 15:40:12 | <lambdabot> | lexical error in string/character literal at end of input |
| 15:40:39 | <[exa]> | blomberg: you are missing a " and a map |
| 15:40:55 | <probie> | :t \x -> "foo" <> x |
| 15:40:56 | <lambdabot> | [Char] -> [Char] |
| 15:40:57 | → | _leo___ joins (~emmanuelu@user/emmanuelux) |
| 15:41:00 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 15:41:01 | <[exa]> | segfaultfizzbuzz: anyway the arguments are taken from the thunk e.g. here: https://gitea.blesmrt.net/exa/uskel/src/branch/master/fibs.s#L12 |
| 15:41:02 | <probie> | :t \x -> "foo" ++ x |
| 15:41:03 | <lambdabot> | [Char] -> [Char] |
| 15:41:04 | <mauke> | don't need map |
| 15:42:09 | <[exa]> | segfaultfizzbuzz: %rbp points to the thunk in memory, first 2 words there are infoptr and "arity", and the 3rd and 4th are the 2 arguments it has, you take them out as 020(%rbp) and 030(%rbp) |
| 15:42:28 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 15:43:27 | <[exa]> | anyway yeah it's a hack on a hack but I actually somehow like it |
| 15:44:03 | <blomberg> | > (\thing -> "the thing is " <> show thing) ["daisy", "daisy", "rose"] |
| 15:44:05 | <lambdabot> | "the thing is [\"daisy\",\"daisy\",\"rose\"]" |
| 15:44:36 | <blomberg> | > (\thing -> "the thing is " <> show thing) ["daisy", "daisy", "rose] |
| 15:44:37 | <lambdabot> | <hint>:1:69: error: |
| 15:44:37 | <lambdabot> | lexical error in string/character literal at end of input |
| 15:44:46 | → | coot joins (~coot@89-69-206-216.dynamic.chello.pl) |
| 15:45:07 | <blomberg> | ok missing "rose" |
| 15:45:12 | <[exa]> | blomberg: btw you can open a PM to lambdabot and evaluate stuff privately before you are sure there are no errors |
| 15:45:15 | <segfaultfizzbuzz> | [exa]: my original goal was sort of the opposite of this,... |
| 15:45:51 | <segfaultfizzbuzz> | [exa]: i wanted to write the simplest haskelly abstract machine, this is a concrete machine,... which is good |
| 15:45:55 | <blomberg> | [exa]: ok i also learnt state monad and xmonad is hell |
| 15:46:01 | <[exa]> | segfaultfizzbuzz: probably unrelated to the goal, just wanted to throw this to you in case it helps :D |
| 15:46:10 | <[exa]> | blomberg: state is pretty easy tbh |
| 15:46:17 | <[exa]> | blomberg: just needs some practice |
| 15:46:21 | <segfaultfizzbuzz> | [exa]: well yeah thanks i was just a bit worried that you thought this was what i was talking about |
| 15:46:37 | <[exa]> | haha no |
| 15:46:56 | <[exa]> | btw I actually fished out a pretty old paper with a much smoother explanation of the whole thing, lemme google |
| 15:47:19 | <blomberg> | [exa]: what's your cmd to set rm get dump |
| 15:47:19 | <segfaultfizzbuzz> | why in assembly are the register names fixed like this, why not redefine them based on the uh "function" or "most recent jump location?" or i don't even know |
| 15:48:34 | <[exa]> | segfaultfizzbuzz: https://dl.acm.org/doi/pdf/10.1145/99370.99385 |
| 15:48:50 | <[exa]> | segfaultfizzbuzz: the registers are set by the CPU you use, no way to change them |
| 15:49:03 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 15:49:09 | <[exa]> | you can rename them with macros or so, which would be a good practice I'd say, but too lazy |
| 15:49:40 | <[exa]> | blomberg: what does that mean |
| 15:49:51 | <segfaultfizzbuzz> | but the registers could be "locally renamed" so that their meaning within a uh, context or whatever you want to call it could be more meaningful,... same for these other things which you are manually explaining,... |
| 15:50:08 | <[exa]> | yeah good point |
| 15:50:11 | <[exa]> | as I said, I was too lazy |
| 15:50:53 | <[exa]> | (unfortunately some of these aren't often possible, in x86 registers tend to have magic meanings) |
| 15:51:20 | <segfaultfizzbuzz> | primop2_ret_int ...? return something...? |
| 15:51:24 | <mauke> | %ax is the axxumulator, %bx is the bxxumulator, etc |
| 15:51:56 | <segfaultfizzbuzz> | i have deliberately avoided assembly,... |
| 15:52:20 | <[exa]> | segfaultfizzbuzz: that's a macro that generates the "returning part" of a primitive operation definition that simply returns an integer |
| 15:52:41 | <[exa]> | (btw I find assembly much easier than base TeX) |
| 15:53:27 | <segfaultfizzbuzz> | yeah well this is why i consider myself a bad programmer, or maybe not a programmer |
| 15:53:43 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 240 seconds) |
| 15:54:13 | <segfaultfizzbuzz> | ok,... but that macro isn't defined in the macros file |
| 15:54:30 | <[exa]> | yeah it's in primops.s afaik |
| 15:54:34 | <segfaultfizzbuzz> | and,... i am trying to read the thunkto macro and can't make sense of it,... |
| 15:54:43 | <[exa]> | which line? |
| 15:54:43 | <segfaultfizzbuzz> | i think i will end up wasting your time trying to decipher this |
| 15:54:47 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 15:54:48 | <blomberg> | [exa]:? how to use your functions |
| 15:55:02 | <segfaultfizzbuzz> | .macro thunkto reg:req,args:vararg |
| 15:55:14 | <[exa]> | blomberg: run the program, and type "set xxx 10" as a first line into it, and "dump" on a second line |
| 15:55:19 | <segfaultfizzbuzz> | i see pushq,... does asm have data structures or something? |
| 15:55:35 | × | marienz quits (~marienz@libera/staff/marienz) (Server closed connection) |
| 15:55:45 | → | marienz joins (~marienz@libera/staff/marienz) |
| 15:56:22 | <[exa]> | segfaultfizzbuzz: ah this. the .thunkto is a recursive macro. Basically by calling `.thunkto register, a, b, c, d` it does `pushq d; pushq c; pushq b; pushq a; mov %rsp, register` |
| 15:56:44 | <[exa]> | so basically pushes whatever you put there in memory conveniently and saves a pointer to that to a register of your choice |
| 15:57:02 | <segfaultfizzbuzz> | also it says armasm somewhere but i think you said this was x86...? |
| 15:57:11 | × | CiaoSen quits (~Jura@2a05:5800:2b2:1b00:664b:f0ff:fe37:9ef) (Ping timeout: 248 seconds) |
| 15:57:24 | <[exa]> | normally people use push/pop for managing the C-like stacks, I just don't have one so I can use push to make data easily |
| 15:57:48 | <segfaultfizzbuzz> | does asm have a queue data structure...? |
| 15:57:53 | <[exa]> | no |
| 15:58:22 | <segfaultfizzbuzz> | then pushq is...? |
| 15:58:23 | <[exa]> | it's directly for CPU, there's no data structures |
| 15:58:30 | <[exa]> | just memory and registers |
| 15:58:47 | <segfaultfizzbuzz> | ... i assume it has something to do with a queue...? |
| 15:59:09 | <[exa]> | pushq %reg does: 1] decrease %rsp by 8 2] copy whatever is in %reg into memory at address %rsp |
| 15:59:33 | <geekosaur> | q means quad iirc |
| 15:59:43 | <[exa]> | qword or so, yes |
| 15:59:48 | <geekosaur> | asm needs sized operations |
| 15:59:51 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 15:59:52 | <albet70> | glguy , scheme |
| 16:00:22 | <geekosaur> | pushb?, pushw, pushd, pushq |
| 16:00:37 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 16:00:39 | <segfaultfizzbuzz> | ... i mean, this is trying to make a stack, i guess...? |
| 16:00:40 | × | _leo___ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 16:00:42 | <geekosaur> | byte word doubleword quadword |
| 16:00:51 | → | _leo___ joins (~emmanuelu@user/emmanuelux) |
| 16:00:59 | <EvanR> | nibble |
| 16:01:10 | <[exa]> | segfaultfizzbuzz: no stack, just using the stacky instruction to copy the data to memory without having to compute the addresses myself with more instructions |
| 16:01:12 | <EvanR> | not sure about name for half-nibble |
| 16:01:19 | <[exa]> | hibble |
| 16:01:32 | <segfaultfizzbuzz> | i mean okay arguably the thunk/thunkto part of this is by far the most important and it is totally uncommented |
| 16:01:38 | <[exa]> | (actually bibit) |
| 16:01:54 | <EvanR> | bibbit |
| 16:02:07 | <geekosaur> | x86 and similar don't really do sub-byte. DEC processors used to do 3-bit subwords |
| 16:02:10 | <EvanR> | bitbit |
| 16:02:47 | <EvanR> | (Bit,Bit) |
| 16:02:52 | <segfaultfizzbuzz> | ifnb? |
| 16:05:21 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 16:05:44 | <[exa]> | segfaultfizzbuzz: that's the assembler macro syntax |
| 16:06:27 | <[exa]> | like here https://sourceware.org/binutils/docs-2.41/as/If.html |
| 16:07:08 | <[exa]> | segfaultfizzbuzz: btw if you don't like macros it might make more sense if you just read the result, `make` and `objdump -S somebinary` |
| 16:07:58 | <segfaultfizzbuzz> | i don't even know what it means to assemble or not assemble something |
| 16:08:32 | <geekosaur> | it just converts the textual format of cpu instructions into the binary format, expanding macros (when supported) as it goes |
| 16:08:57 | <segfaultfizzbuzz> | i will make an attempt at reading this but it is very difficult, it would be like i explained something to you in french and you need to go learn french for the first time |
| 16:09:43 | <geekosaur> | you will find that it is in fact a very simple language |
| 16:10:01 | <segfaultfizzbuzz> | okay so the thunkto recursively thunks all of its arguments |
| 16:10:01 | → | mud joins (~mud@user/kadoban) |
| 16:10:18 | <segfaultfizzbuzz> | and thunking is this pushq operation,... which i think is a stack essentially...? |
| 16:10:57 | <segfaultfizzbuzz> | and then after thunking all of the arguments, it changes the program counter to point at the first thunk |
| 16:11:07 | <[exa]> | people tended to use memory for stacking things so much that this (decrease and move) instruction combination got its own instruction and was named "push" for obvious reasons :] |
| 16:11:36 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 258 seconds) |
| 16:11:45 | <[exa]> | segfaultfizzbuzz: yeah something like that. You can check the `enter` macro, that does the thing |
| 16:11:51 | <geekosaur> | once the concept was invented, at least (see Algol) |
| 16:12:05 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 16:12:17 | <segfaultfizzbuzz> | why decrease %rsp by 8? everything is 64 bit here right? wouldn't it be decrease by 4...? |
| 16:12:28 | <[exa]> | 64bit values have 8 bytes |
| 16:12:32 | <probie> | the "q" in the instruction just means quadword (64-bits) and "d" means doubleword (32-bits). A "word" is 16 bits because x86 was originally a 16-bit instruction set |
| 16:12:36 | <segfaultfizzbuzz> | ay my bad right |
| 16:12:39 | <geekosaur> | divide 64 bits by 8 bits per byte |
| 16:12:49 | <segfaultfizzbuzz> | sorry i think my head is still in the 32 bit era lol |
| 16:12:55 | <[exa]> | btw I found the octal notation too good not to use for the offsets |
| 16:13:13 | <[exa]> | 000(%reg), 010(%reg), 020(%reg) <3 |
| 16:13:20 | <probie> | so any time you see an x86 op ending with "q" think 64 bits, and "d" think 32 bits |
| 16:14:27 | <segfaultfizzbuzz> | offsets...? |
| 16:15:12 | <[exa]> | (%reg) means "memory at the register value", and some instructions also accept encoding like 123(%reg) which means "memory at the address of (register value + 123)" |
| 16:15:13 | <segfaultfizzbuzz> | okay yeah i am lost reading this |
| 16:15:20 | <segfaultfizzbuzz> | not having types hurts my head too |
| 16:15:23 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 16:15:35 | <segfaultfizzbuzz> | like just the thunkto .. $plus .. |
| 16:15:41 | <[exa]> | segfaultfizzbuzz: yeah, sadly this can't have types, computers don't have types |
| 16:15:42 | → | random-jellyfish joins (~random-je@user/random-jellyfish) |
| 16:15:46 | <segfaultfizzbuzz> | does $plus expand into multiple arguments? |
| 16:16:18 | <[exa]> | no it expands to the address of the "plus" label |
| 16:16:28 | <[exa]> | basically it becomes a function pointer for plus (if you like C) |
| 16:16:42 | <segfaultfizzbuzz> | and then $2 ...? |
| 16:16:53 | <[exa]> | also it's not expansion, $ is a label for values that don't mean anything |
| 16:16:58 | <mauke> | $ marks constants |
| 16:17:01 | <mauke> | $2 is the number 2 |
| 16:17:06 | <segfaultfizzbuzz> | LOL |
| 16:17:12 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 16:17:19 | <segfaultfizzbuzz> | it is both a memory address and a literal? |
| 16:17:23 | <[exa]> | if I would do `pushq 5` it would try to fish out a value from memory address 5 |
| 16:17:24 | <mauke> | same thing |
| 16:17:26 | <segfaultfizzbuzz> | this is why i have avoided memory |
| 16:17:28 | <[exa]> | typically giving a segfault. |
| 16:17:31 | <segfaultfizzbuzz> | avoided assembly i mean |
| 16:17:47 | <[exa]> | it's a number, it can mean anything |
| 16:17:47 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 16:18:11 | <segfaultfizzbuzz> | ^ that is quote worthy |
| 16:18:18 | <[exa]> | polymorphism at best! |
| 16:18:21 | <mauke> | the 123(%ecx) notation made more sense when you had mostly arrays, which were of course global entities in the data segment, indexed by variables (registers) |
| 16:18:29 | <segfaultfizzbuzz> | lol this is maximally polymorphic code |
| 16:18:30 | <mauke> | some_numbers(%ecx) |
| 16:18:57 | <geekosaur> | you've heard of "stringly typed"? asm is "numberly typed" |
| 16:19:04 | <segfaultfizzbuzz> | yeah |
| 16:19:08 | <mauke> | that's basically like array indexing |
| 16:19:28 | <segfaultfizzbuzz> | don't like make a mistake or anything >:) |
| 16:19:39 | <[exa]> | segfaultfizzbuzz: yeah anyway the notation is also used for structure access typically, in C++ if you do something like struct->xxx, it typically takes 111(%reg) where 111 is offsetof(struct_type,xxx) and %reg is where it currently stores the pointer |
| 16:19:45 | <geekosaur> | this is why higher level languages were invented |
| 16:20:19 | <mauke> | nowadays you usually have (dynamic) objects (so their address is in a register) accessed at a statically known offset (= member) |
| 16:20:53 | <mauke> | so it's all index(ptr), which looks backwards |
| 16:21:06 | <mauke> | C has your back, of course. in C you can also write i[array] :-) |
| 16:21:11 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1030:d66f:8de7:984f) (Remote host closed the connection) |
| 16:21:18 | <segfaultfizzbuzz> | lol |
| 16:21:30 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 16:21:52 | × | random-jellyfish quits (~random-je@user/random-jellyfish) (Quit: Client closed) |
| 16:22:00 | <segfaultfizzbuzz> | so i mean this asm program is a stack of instructions.... i guess? lol |
| 16:22:03 | <[exa]> | segfaultfizzbuzz: arrai[idx] == *(array+idx) == *(idx+array) == idx[array] and for this reason I'm unhappy that such an algebraic marvel still wasn't implemented in haskell |
| 16:22:21 | <[exa]> | segfaultfizzbuzz: the instructions are static, I'm just misusing the stack for storing the thunk data |
| 16:22:56 | <[exa]> | segfaultfizzbuzz: to see what the CPU sees, just clone the repository, type `make`, and then `objdump -S print_123` |
| 16:23:06 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 16:23:21 | <segfaultfizzbuzz> | this had better not steal my bitcoins |
| 16:23:48 | <geekosaur> | I would hate to try to write anything involving NFTs directly in asm |
| 16:23:53 | <segfaultfizzbuzz> | haha |
| 16:24:00 | <segfaultfizzbuzz> | 4 errors |
| 16:24:28 | <[exa]> | yeah the program probably wouldn't be like 8kB |
| 16:24:30 | <[exa]> | :D |
| 16:24:49 | <[exa]> | segfaultfizzbuzz: do you have a gnu assembler as the system `as` ? with that it should work |
| 16:25:01 | <[exa]> | also I didn't really try it on any other computer yet |
| 16:25:03 | <[exa]> | ymmv wildly |
| 16:25:08 | <segfaultfizzbuzz> | https://paste.rs/otYlM.php |
| 16:25:13 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 16:25:38 | <[exa]> | segfaultfizzbuzz: https://paste.tomsmeding.com/WoWtvjTR I got it here |
| 16:25:48 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 16:25:55 | <[exa]> | segfaultfizzbuzz: what's your `as --version` ? |
| 16:26:03 | <mauke> | what platform is this? |
| 16:26:04 | × | _leo___ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 16:26:05 | <geekosaur> | doesn't have jmp? is that an x86? |
| 16:26:16 | <segfaultfizzbuzz> | i am on a mac because i am cooler than all of you |
| 16:26:22 | <geekosaur> | then it won't work |
| 16:26:32 | <geekosaur> | arm is a different instruction set |
| 16:26:34 | <[exa]> | oh boy, I should hae used C! |
| 16:26:40 | <segfaultfizzbuzz> | haha |
| 16:27:10 | → | sinbad joins (~sinbad@user/sinbad) |
| 16:27:14 | <segfaultfizzbuzz> | https://www.youtube.com/watch?v=1S1fISh-pag |
| 16:28:34 | <[exa]> | ah yeah on arm it's called B like "branch" |
| 16:29:17 | <mauke> | you know when you're on a path, and suddenly it splits into ... one path? that's called a branch |
| 16:29:30 | <[exa]> | ez branch |
| 16:29:31 | × | cafkafk_ quits (~cafkafk@fsf/member/cafkafk) (Remote host closed the connection) |
| 16:29:34 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 16:30:02 | <segfaultfizzbuzz> | b fixed that,... |
| 16:30:23 | <geekosaur> | you will have a lot more "fun" trying to translate that for arm |
| 16:30:42 | <geekosaur> | the right language to write that in was probably cmm |
| 16:32:46 | <[exa]> | hm I might actually have written this in lli |
| 16:32:54 | <[exa]> | gooooood |
| 16:33:02 | <segfaultfizzbuzz> | i am not with a real computer right now, but maybe in a few days i will be with one (x86) and then i will let you steal the bitcoins from that computer |
| 16:33:16 | <[exa]> | :D |
| 16:34:20 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 16:34:34 | <segfaultfizzbuzz> | but yeah sorry i am too much of a noob (or really, too experienced) to touch the asm config of this machine |
| 16:34:48 | → | cafkafk_ joins (~cafkafk@fsf/member/cafkafk) |
| 16:35:20 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 16:37:13 | → | wroathe joins (~wroathe@50.205.197.50) |
| 16:37:13 | × | wroathe quits (~wroathe@50.205.197.50) (Changing host) |
| 16:37:13 | → | wroathe joins (~wroathe@user/wroathe) |
| 16:38:31 | → | billchenchina joins (~billchenc@2a0c:b641:7a2:320:ee3e:47ca:6070:d71a) |
| 16:38:38 | <[exa]> | segfaultfizzbuzz: how do you "touch asm config" of a machine? (other than replacing the CPU) |
| 16:38:47 | <segfaultfizzbuzz> | haha assembler config |
| 16:38:53 | <segfaultfizzbuzz> | switching as to some other thing |
| 16:39:02 | × | ripspin quits (~chatzilla@1.145.231.215) (Remote host closed the connection) |
| 16:39:14 | <EvanR> | arrai[idx] == *(array+idx) == *(idx+array) == idx[array] is obviously true, and I learned the underlying justification at some point, and I still don't get it xD |
| 16:39:17 | → | mmhat joins (~mmh@p200300f1c7178a73ee086bfffe095315.dip0.t-ipconnect.de) |
| 16:39:21 | × | mmhat quits (~mmh@p200300f1c7178a73ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit) |
| 16:39:32 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:39:44 | <mauke> | justification: + is commutative, even when doing pointer arithmetic |
| 16:39:52 | <mauke> | the rest is just the definition of [] |
| 16:39:55 | <[exa]> | ah you might probably just run it in the x86-ish docker if you have it installed |
| 16:39:56 | <EvanR> | yes that's the obviously true part |
| 16:40:12 | <geekosaur> | or install binutils via brew/macports |
| 16:40:12 | <EvanR> | + commutative and definition of array notation |
| 16:40:18 | × | cafkafk_ quits (~cafkafk@fsf/member/cafkafk) (Ping timeout: 246 seconds) |
| 16:40:22 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 16:40:33 | <geekosaur> | if all you need is binutils as macros |
| 16:41:10 | <mauke> | sizeof(0)["abcdefgijk"] |
| 16:41:17 | <EvanR> | the underlying justification involves the size of elements |
| 16:41:26 | <EvanR> | some C thing |
| 16:41:35 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 16:42:51 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds) |
| 16:42:52 | <segfaultfizzbuzz> | bbiab |
| 16:42:53 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Quit: segfaultfizzbuzz) |
| 16:46:39 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 16:47:20 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 16:49:36 | → | Guest76 joins (~Guest76@212.3.193.144) |
| 16:52:05 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 16:54:41 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 16:56:52 | → | _leo___ joins (~emmanuelu@user/emmanuelux) |
| 16:56:59 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
| 16:58:49 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:01:35 | × | hongminhee quits (sid295@id-295.tinside.irccloud.com) (Server closed connection) |
| 17:01:44 | → | hongminhee joins (sid295@id-295.tinside.irccloud.com) |
| 17:04:55 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 17:06:10 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:07:24 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 17:08:28 | × | meejah quits (~meejah@rutas.meejah.ca) (Server closed connection) |
| 17:08:37 | → | meejah joins (~meejah@rutas.meejah.ca) |
| 17:12:23 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 17:13:17 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:18:13 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 244 seconds) |
| 17:19:36 | → | cafkafk_ joins (~cafkafk@fsf/member/cafkafk) |
| 17:20:07 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 17:20:41 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:22:43 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6535:85da:4e96:843e) |
| 17:23:17 | <segfaultfizzbuzz> | this will sound offtopic from our very concrete discussion |
| 17:24:05 | <segfaultfizzbuzz> | but at a high level it would be nice to "write mathematics" rather than computer programs |
| 17:24:12 | × | Guest76 quits (~Guest76@212.3.193.144) (Quit: Client closed) |
| 17:24:22 | <segfaultfizzbuzz> | and i am curious to understand what the actual difference is |
| 17:24:43 | <segfaultfizzbuzz> | i think people regard these two things as "obviously" different |
| 17:24:56 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:25:06 | × | cafkafk_ quits (~cafkafk@fsf/member/cafkafk) (Ping timeout: 246 seconds) |
| 17:26:29 | <EvanR> | in math you're pretty sure the sqrt function doesn't have side effects |
| 17:27:04 | <EvanR> | which is nice |
| 17:27:53 | <monochrom> | We already know how to define side effects in math. That won't be a difference. |
| 17:28:25 | <monochrom> | In principle there is no difference. And that's what I do and how I write both programs and proofs. |
| 17:28:57 | <monochrom> | But as usual, specialization will cause all kinds of differences in skills and talents. |
| 17:29:03 | <EvanR> | world state transfer tracking or some such? |
| 17:29:24 | <monochrom> | No. |
| 17:29:59 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 17:30:56 | <monochrom> | It depends on specifically which effect, but for each of them we know how to do it in math, and we also know how to combine most of them. |
| 17:31:13 | <monochrom> | (It is called "computer science".) |
| 17:32:19 | <EvanR> | I'm wondering if segfaultfizzbuzz meant something by mathematics that would draw an actual distinction so your tautologies would not fire xD |
| 17:33:18 | → | emmanuelux_ joins (~emmanuelu@user/emmanuelux) |
| 17:35:05 | <monochrom> | Even if you look only into math as in only what people in math departments do, you take a look at how the differential equation people work, and you take a look at how the group theory people work, that already is a big difference. And both are within math. "both". "math". |
| 17:35:27 | <monochrom> | So why is it surprising that proofs and programs feel different? |
| 17:35:41 | <wroathe> | Math does have side effects. It has the side effect of making me feel inferior. |
| 17:36:03 | × | _leo___ quits (~emmanuelu@user/emmanuelux) (Ping timeout: 258 seconds) |
| 17:36:32 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:36:46 | <monochrom> | Specialization happens. Skill sets diverge. |
| 17:37:20 | <monochrom> | Don't forget that mathematicians like Ada Lovelace and Alan Turing wrote the first programs. |
| 17:37:59 | <monochrom> | Don't even forget that philosophers like Newton branched off math and physics. |
| 17:38:38 | <monochrom> | One may as well ask "why are philosophy and math different? why are philosophy and physics different? why are math and physics different?" |
| 17:38:54 | <monochrom> | Well they used to be one and the same. Then specialization happened. |
| 17:39:39 | <EvanR> | everyone agrees when/that a bogus proof/program is bogus, unlike philosophy xD |
| 17:39:54 | <segfaultfizzbuzz> | side effects is one good answer,... another (good?) answer here might be that programs (albeit maybe not pure fp) are typically about sequences of instructions |
| 17:40:34 | <geekosaur> | proofs are composed of sequences of instructions/equations to apply |
| 17:40:38 | <EvanR> | unless you get into dynamically typed programming then people don't agree anymore and it's more like philosophy |
| 17:41:35 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 17:42:11 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:42:14 | → | cafkafk_ joins (~cafkafk@fsf/member/cafkafk) |
| 17:42:24 | <EvanR> | yeah look at euclids proofs, it's a series of steps to go from the hypotheses to the conclusion |
| 17:42:53 | <EvanR> | a recipe to prove the thing |
| 17:43:05 | <monochrom> | It is, however, very pruduent to make a distinction between philosophers and armchari philosophers. Totally different. |
| 17:47:15 | <EvanR> | I suggest a way to clarify segfaultfizzbuzz's distinction: the interfaces. The interfaces of stuff you have in the software world, including all the side effects and other nonsense, are very complex. The interface to the stuff in modern math is (appears to be, is presented as?) much more streamlined. Or maybe this is just really good type inference |
| 17:47:24 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 17:47:51 | → | eggplant_ joins (~Eggplanta@2600:1700:38c5:d800:18df:787d:85fc:cca8) |
| 17:47:55 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:48:13 | <EvanR> | in which case yeah math is nicer |
| 17:48:23 | <monochrom> | That is a consequence of specialization. |
| 17:49:40 | <monochrom> | Before programming existed, people would say the same about physics. |
| 17:51:08 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6535:85da:4e96:843e) (Ping timeout: 246 seconds) |
| 17:52:05 | <jjhoo> | should one talk only about physics, or make a distinction between theoretical physics and experimental physics. |
| 17:52:48 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 17:53:59 | <monochrom> | One more specialization and divergence right there. |
| 17:54:51 | <monochrom> | Even the fluid dynamics people and the particle physics people work in very different ways. |
| 17:55:38 | <segfaultfizzbuzz> | ...i am thinking programs are basically PRNG systems whereas math is not |
| 17:55:49 | <segfaultfizzbuzz> | math is everything which is not PRNG |
| 17:56:14 | <EvanR> | segfaultfizzbuzz, I'm thinking the answer to your original question is what is the program / proof supposed to do / supposed to be about. In which case one language or the other might be nicer |
| 17:56:23 | <monochrom> | You have not heard of the math area called "dynamic systems"? Not even under the popsci name "chaos"? |
| 17:56:49 | <segfaultfizzbuzz> | monochrom: yep used to code that up, but you would use mathematics to encapsulate predictions such as statistical predictions |
| 17:57:00 | <dolio> | The difference between writing programs and writing math that is consumed by a computer is that the latter is harder. |
| 17:57:01 | <segfaultfizzbuzz> | you won't actually use mathematics to follow the individual trajectories |
| 17:57:18 | <segfaultfizzbuzz> | there is a practical useful line of thinking to be had here however |
| 17:57:35 | <segfaultfizzbuzz> | which is, are side effects entangled with the program or can they often/always be separated...? |
| 17:57:52 | × | cafkafk_ quits (~cafkafk@fsf/member/cafkafk) (Remote host closed the connection) |
| 17:57:54 | <EvanR> | many algorithms are easier to write down in the language of side effects |
| 17:58:17 | <EvanR> | so disentangling them is counterproductive |
| 17:58:37 | <segfaultfizzbuzz> | comes down to noninvertible steps in the algo maybe? |
| 17:58:46 | <TMA> | I think EvanR's remark about the interfaces is good. math is concerned with "simple interfaces" whereas programming is concerned with "poorly understood complex interfaces" |
| 17:59:12 | <segfaultfizzbuzz> | hmm |
| 17:59:27 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:59:37 | <EvanR> | that also might just be a maturity thing |
| 17:59:43 | <EvanR> | I don't know |
| 17:59:57 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 18:00:54 | <segfaultfizzbuzz> | [exa]: i asked bard to translate your x86 asm into arm and it doesn't seem to be working lol |
| 18:01:07 | <TMA> | a procedure that reads a character from the standard input has the whole of the universe as an argument |
| 18:01:18 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:01:31 | → | cafkafk_ joins (~cafkafk@fsf/member/cafkafk) |
| 18:02:21 | <EvanR> | unfortunately you can't separate the computer from the universe, because quantum mechanics |
| 18:02:26 | <segfaultfizzbuzz> | TMA: sort of but not really, you can only get information from nearby |
| 18:02:28 | <EvanR> | so they both take each other as arguments! |
| 18:03:02 | <segfaultfizzbuzz> | but information does travel pretty rapidly on a planetary scale, so the practical diameter and number of things which can have an effect is pretty substantial |
| 18:03:37 | <EvanR> | you're talking about the past lightcone of the running computer which is very big |
| 18:03:53 | <EvanR> | astronomy uses it all the time |
| 18:04:08 | <TMA> | because that character is influenced not only by some external software state (say system locale which tells that this particular set of bits coming from somewhere shall be interpreted as that or other character), but for example on some radioactive decay when those bits come from a gaiger counter |
| 18:04:18 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 18:04:43 | <TMA> | or a radiotelescope |
| 18:05:12 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 18:06:21 | <segfaultfizzbuzz> | actually, it is not a lightcone. it is a 5d volume, because you don't quite know how far in the past the information comes from,... and the farther in the past the greater the potential radius |
| 18:06:23 | × | mud quits (~mud@user/kadoban) (Quit: quit) |
| 18:06:34 | <segfaultfizzbuzz> | volume*time^2, super weird units |
| 18:07:40 | <EvanR> | anyway no the point of the computer is to look into an abstract world, and do everything it can to suppress the real world when it gets in the way. See the schmitt triggers on the input pins to your arduino, hardcore suppression |
| 18:08:40 | <EvanR> | error correction on your SSD data |
| 18:10:20 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 18:10:35 | × | dolio quits (~dolio@130.44.134.54) (Server closed connection) |
| 18:10:51 | → | dolio joins (~dolio@130.44.134.54) |
| 18:13:41 | → | aaronv joins (~aaronv@user/aaronv) |
| 18:16:42 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 18:17:06 | × | eggplant_ quits (~Eggplanta@2600:1700:38c5:d800:18df:787d:85fc:cca8) (Remote host closed the connection) |
| 18:18:30 | <blomberg> | hey guys just like in python print(x) prints the global variable, will haskell be able to access externals? |
| 18:18:45 | <blomberg> | y=x; where x is a global |
| 18:19:50 | <geekosaur> | you do not generally use globals in Haskell |
| 18:20:00 | <geekosaur> | you need to rethink how you program |
| 18:21:40 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 18:21:42 | <blomberg> | i mean will it allow me to like in python, x=5;def f():y=x;print(x) ; can i do this in haskell |
| 18:21:57 | <blomberg> | i mean will it allow me to like in python, x=5;def f():y=x;print(y) ; can i do this in haskell |
| 18:22:12 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 18:22:29 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 18:22:42 | <blomberg> | can i assigns globals to locals inside a function,... very basic question |
| 18:22:53 | <institor> | blomberg: i recommend getting a handle on pure functional programming first |
| 18:23:19 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:23:25 | <monochrom> | I do not see why, for that toy example, you must insist x to be global. |
| 18:23:28 | <institor> | > let x = 5; y = x in print y |
| 18:23:31 | <lambdabot> | <IO ()> |
| 18:23:40 | <institor> | well shit |
| 18:23:56 | <probie> | % let x = 5; y = x in print y |
| 18:23:56 | <yahb2> | Oops, something went wrong |
| 18:24:49 | <blomberg> | monochrom: will it show error or not |
| 18:25:17 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:25:25 | <monochrom> | % let x = 5; y = x in print y |
| 18:25:25 | <yahb2> | 5 |
| 18:25:28 | <institor> | blomberg: when working in haskell you should get the idea of "mutability" out of your head |
| 18:25:30 | <institor> | (for now) |
| 18:25:33 | <monochrom> | (You just have to try again :) ) |
| 18:26:25 | <monochrom> | IMO that question is stupid and I won't answer. |
| 18:26:40 | <blomberg> | institor: did you know my earlier conversation |
| 18:26:41 | <institor> | % readFile "/etc/passwd" |
| 18:26:41 | <yahb2> | *** Exception: /etc/passwd: openFile: does not exist (No such file or directory) |
| 18:27:05 | <institor> | % writeFile "/tmp/hello" "world" |
| 18:27:05 | <yahb2> | <no output> |
| 18:27:12 | <blomberg> | monochrom:i think that's fundamental to understanding the functional approach |
| 18:27:12 | <institor> | % readFile "/tmp/hello" |
| 18:27:12 | <yahb2> | "world" |
| 18:27:14 | <institor> | lol |
| 18:27:27 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 244 seconds) |
| 18:27:30 | <institor> | % readFile "/bin/sh" |
| 18:27:30 | <yahb2> | *** Exception: /bin/sh: hGetContents: invalid argument (invalid byte sequence) |
| 18:27:39 | <institor> | % writeFile "/bin/sh" "" |
| 18:27:39 | <yahb2> | *** Exception: /bin/sh: withFile: permission denied (Read-only file system) |
| 18:27:44 | <institor> | ah ok |
| 18:28:12 | <institor> | blomberg: i recommend reading the book "Learn You a Haskell" |
| 18:28:20 | <monochrom> | Even if you're an English-speaking person learning Japanese, "translating" English into Japan word-by-word is stupid. And they are not all that different. |
| 18:28:36 | <institor> | speaking of fundamentals... |
| 18:29:02 | <blomberg> | institor: define a function that borrows x from outside , should it be atleast allowed as a FP approach or not, it has nothing to do with me reading that thick book |
| 18:29:18 | <institor> | blomberg: have it your way, you're going to be lost |
| 18:30:10 | <blomberg> | > x=5; f = y where y=x |
| 18:30:12 | <lambdabot> | <hint>:1:2: error: parse error on input ‘=’ |
| 18:30:13 | <institor> | i have blomberg appliances |
| 18:30:26 | <monochrom> | In Chinese, at least 50 years ago, we didn't greet each other with "good day" or "good" anything. We said "have you had your meal?". (Even that is not the exact wording. The exact wording was "have you eaten?".) |
| 18:30:30 | <institor> | the defroster in my freezer is broken |
| 18:30:39 | <institor> | but parts & labour are damn expensive |
| 18:30:48 | <blomberg> | what's the correction to my line |
| 18:30:59 | <blomberg> | > x=5; f = y where y=x; |
| 18:31:00 | <lambdabot> | <hint>:1:2: error: parse error on input ‘=’ |
| 18:31:16 | <monochrom> | So a Chinese-speaking person asking "how do you translate 'have you eaten?' into English, word for word" and saying "just answer me, it's a basic question", that's... well you get my point. |
| 18:31:20 | <blomberg> | % x=5; f = y where y=x; |
| 18:31:21 | <yahb2> | <no output> |
| 18:31:32 | <blomberg> | % x=5; f = y where y=x;print y; |
| 18:31:32 | <yahb2> | <interactive>:23:29: error: parse error on input ‘;’ |
| 18:31:35 | <institor> | blomberg: https://www.haskell.org/tutorial/patterns.html |
| 18:31:38 | <blomberg> | what's the error |
| 18:31:40 | <institor> | > 4.5 Lexical Scoping and Nested Forms |
| 18:31:41 | <lambdabot> | error: Data constructor not in scope: Lexicalerror: Data constructor not in ... |
| 18:31:46 | <institor> | blomberg: try reading the manual |
| 18:31:51 | <institor> | or something at least |
| 18:32:12 | <blomberg> | oh god i already know haskell |
| 18:32:16 | <institor> | obviously not |
| 18:32:19 | <monochrom> | The correct thing to do is to first understand what is the role played by "have you eaten?", recognize that the answer is greeting, then you ask how do English-speaking people actually greet each other. |
| 18:32:23 | <institor> | god |
| 18:32:31 | <institor> | chatGPT is going to take over programmers' jobs, my ass |
| 18:32:46 | <institor> | at this rate it'll be a miracle if they even know how to use chatGPT |
| 18:34:01 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 18:34:15 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 18:34:21 | <institor> | % callCommand "mount" |
| 18:34:21 | <yahb2> | <interactive>:25:1: error: ; Variable not in scope: callCommand :: String -> t |
| 18:35:20 | <institor> | % readFile "/etc/mtab" |
| 18:35:20 | <yahb2> | *** Exception: /etc/mtab: openFile: does not exist (No such file or directory) |
| 18:35:36 | <EvanR> | blomberg, you can literally let x = someGlobalVariable, e.g. let f = chr in f 32 |
| 18:35:46 | <EvanR> | > let f = chr in f 42 |
| 18:35:48 | <lambdabot> | '*' |
| 18:36:14 | <EvanR> | chr is a variable, and global |
| 18:36:38 | <blomberg> | % x=5; f = y where y=x;print y; where is the error in my line |
| 18:36:38 | <yahb2> | <interactive>:29:29: error: parse error on input ‘;’ |
| 18:36:48 | <institor> | lmfao |
| 18:37:04 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:18df:787d:85fc:cca8) |
| 18:37:15 | <EvanR> | > let x = 5 in print x |
| 18:37:17 | <lambdabot> | <IO ()> |
| 18:37:31 | <institor> | :23:28 institor | > let x = 5; y = x in print y |
| 18:37:34 | <EvanR> | > let y = print; x = 5 in y x |
| 18:37:34 | <blomberg> | no i want a function |
| 18:37:36 | <lambdabot> | <IO ()> |
| 18:37:59 | <yushyin> | blomberg: works fine with functions too, in haskell functions can close over free variables |
| 18:38:10 | → | danza__ joins (~francesco@151.44.164.112) |
| 18:38:55 | <EvanR> | let <equations> in <expr> |
| 18:39:13 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 18:39:41 | <blomberg> | yushyin: so they can close over any variable, even without let , so the function is accepting other inputs apart from the main body , so it's not fully closed? but i admit it still has no side effects as the external value is constant |
| 18:39:58 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 18:40:25 | <blomberg> | EvanR: without let |
| 18:40:35 | × | caasih quits (sid13241@id-13241.ilkley.irccloud.com) (Server closed connection) |
| 18:40:39 | <blomberg> | why are you so excited about let |
| 18:40:42 | <blomberg> | it's fucked up |
| 18:40:44 | → | caasih joins (sid13241@id-13241.ilkley.irccloud.com) |
| 18:41:24 | <institor> | @hoogle put |
| 18:41:25 | <lambdabot> | Data.ByteString.Builder.Internal put :: (forall r . (a -> BuildStep r) -> BuildStep r) -> Put a |
| 18:41:25 | <lambdabot> | Control.Monad.Trans.RWS.CPS put :: Monad m => s -> RWST r w s m () |
| 18:41:25 | <lambdabot> | Control.Monad.Trans.RWS.Lazy put :: (Monoid w, Monad m) => s -> RWST r w s m () |
| 18:42:42 | <probie> | blomberg: What are you actually trying to do? |
| 18:43:18 | <institor> | % runStateT (put 42 >> get >>= (\x -> liftIO $ print x)) 0 |
| 18:43:18 | <yahb2> | <interactive>:31:1: error: ; Variable not in scope: runStateT :: m0 b0 -> t1 -> t ; ; <interactive>:31:12: error: ; Variable not in scope: put :: t0 -> m0 a1 ; ; <interactive>:31:22: erro... |
| 18:43:21 | <blomberg> | probie: can functions be closed in haskell, and not access outer scopes |
| 18:43:23 | <institor> | rip |
| 18:43:51 | <institor> | > runStateT (put 42 >> get >>= (\x -> liftIO $ print x)) 0 |
| 18:43:52 | <lambdabot> | error: |
| 18:43:52 | <lambdabot> | • Ambiguous type variable ‘m0’ arising from a use of ‘show_M708524405107... |
| 18:43:52 | <lambdabot> | prevents the constraint ‘(Show |
| 18:43:59 | × | danza__ quits (~francesco@151.44.164.112) (Ping timeout: 250 seconds) |
| 18:44:10 | <blomberg> | institor:please pm the bot lamdabot |
| 18:44:23 | <institor> | blomberg | % x=5; f = y where y=x;print y; where is the error in my line |
| 18:44:53 | <blomberg> | /pm lambdabot and stop pasting here institor don't do that shit of monads i never asked monads i hate them |
| 18:44:56 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 18:45:02 | <institor> | :32:12 blomberg | oh god i already know haskell |
| 18:45:02 | <blomberg> | you even know it |
| 18:45:25 | <blomberg> | yes, but i hate monads and internal code of haskell |
| 18:45:32 | <institor> | hopeless |
| 18:45:43 | <haskellbridge> | <mauke> That was StateT, not monads |
| 18:46:14 | <probie> | blomberg: Not really. The closest you can get is likely sticking the function in a separate module |
| 18:47:07 | <blomberg> | okay that is what i wanted to know |
| 18:47:29 | → | artem joins (~artem@2601:249:4380:8950:f474:e3f8:9806:671) |
| 18:47:29 | × | ulysses4ever quits (~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer) |
| 18:47:30 | <blomberg> | so even without let ; they can access outer scopes |
| 18:47:55 | <yushyin> | sure, they will close over free variables |
| 18:47:59 | <haskellbridge> | <mauke> What do you think is so special about let? |
| 18:48:28 | <institor> | where is this bridged to |
| 18:48:30 | <institor> | matrix? |
| 18:48:33 | <geekosaur> | yes |
| 18:48:34 | <monochrom> | yeah matrix |
| 18:48:40 | <blomberg> | it's just a inner scope like functions and nothing else;but i don't know how haskell implement it |
| 18:48:41 | <institor> | hipsters |
| 18:48:46 | <geekosaur> | #haskell-irc:matrix.org |
| 18:49:17 | <blomberg> | yushyin:why you say "free" variables what are bound variables here ? |
| 18:49:33 | <blomberg> | it's that lambda calculus thing |
| 18:49:40 | <institor> | > (\x -> x) 42 |
| 18:49:41 | × | hays quits (rootvegeta@fsf/member/hays) (Ping timeout: 246 seconds) |
| 18:49:41 | <lambdabot> | 42 |
| 18:50:11 | <haskellbridge> | <mauke> The local variables |
| 18:50:24 | <institor> | > (\x -> x) y |
| 18:50:25 | <lambdabot> | y |
| 18:50:48 | <haskellbridge> | <mauke> "bound" basically means defined |
| 18:50:55 | <blomberg> | haskellbridge: my nick is my <_auke> ?? |
| 18:51:19 | <probie> | blomberg: what you can't do in Haskell is have a top-level statement like `print x`. You can do something like `main = print x` |
| 18:51:25 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 18:51:37 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:51:44 | <probie> | blomberg: their nick is mauke - there are multiple users on that bridge |
| 18:52:18 | <haskellbridge> | <mauke> No, your nick is blomberg |
| 18:54:06 | <blomberg> | how can i do that what you did haskellbridge you are geekosaur ? |
| 18:54:22 | <blomberg> | which software you used |
| 18:54:36 | <geekosaur> | I'm not sure what you are asking? |
| 18:55:04 | <monochrom> | Space, the final delimiter. |
| 18:55:23 | <institor> | CAPTAIN'S LOG STARDATE 42069.69.69 |
| 18:55:38 | <monochrom> | No, you mean: |
| 18:55:53 | <monochrom> | CAPTAIN S LOG STARDATE 42069 69 69 |
| 18:55:59 | <geekosaur> | haskellbridge is a matterbridge (https://github.com/42wim/matterbridge), configured to bridge between multiple IRC channels <-> Matrix rooms |
| 18:56:04 | <monochrom> | Space, the final delimiter. Remeber? |
| 18:56:09 | <geekosaur> | this is just one of the bridges |
| 18:56:13 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 240 seconds) |
| 18:56:17 | <institor> | i use the field separator character |
| 18:56:34 | <institor> | oh i guess it's actually "record separator" |
| 18:57:08 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 18:57:12 | <yushyin> | blomberg: what is free depends on the context, in an expression like (\x -> x y) the y is free |
| 18:57:49 | <institor> | no, as cage the elephant said |
| 18:58:01 | <institor> | "there ain't nothing in this world for free" |
| 18:58:38 | <blomberg> | if inside function i x=2 but outside x=5 then what |
| 18:58:50 | <blomberg> | x is not function parameter |
| 18:59:07 | <monochrom> | I think you know enough Haskell to try it out yourself. |
| 18:59:16 | → | danza__ joins (~francesco@151.44.164.112) |
| 18:59:38 | <blomberg> | > x=5;f a b = x where x=1; |
| 18:59:39 | <lambdabot> | <hint>:1:2: error: parse error on input ‘=’ |
| 18:59:45 | <blomberg> | % x=5;f a b = x where x=1; |
| 18:59:45 | <yahb2> | <no output> |
| 18:59:58 | <blomberg> | the bot don't tell |
| 19:00:08 | <monochrom> | lambdabot is not perfect. You can run your own ghci. |
| 19:00:14 | <geekosaur> | you only defined it, you didn't run it |
| 19:00:31 | <blomberg> | > x=5;f a b = x where x=1; f 2 3; |
| 19:00:33 | <lambdabot> | <hint>:1:2: error: parse error on input ‘=’ |
| 19:00:45 | <blomberg> | what did i do wrong |
| 19:00:55 | <geekosaur> | > is lambdabot which only does expressions, % is yahb which is ghci |
| 19:00:57 | <lambdabot> | <hint>:1:41: error: parse error on input ‘,’ |
| 19:00:57 | <monochrom> | The choice of using lambdabot. |
| 19:01:15 | <blomberg> | % x=5;f a b = x where x=1; f 2 3; |
| 19:01:15 | <yahb2> | <interactive>:35:31: error: parse error on input ‘;’ |
| 19:02:10 | <geekosaur> | okay, the problem there is that where uses layout so you need braces around the where part |
| 19:02:11 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 19:02:27 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds) |
| 19:02:32 | <geekosaur> | otherwise it does the wrong thing with the semicolon (expecting another local where binding) |
| 19:02:54 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 19:02:55 | <geekosaur> | % x=5; f a b = x where {x = 1}; f 2 3; |
| 19:02:55 | <yahb2> | <interactive>:37:31: error: ; Parse error: module header, import declaration ; or top-level declaration expected. |
| 19:03:00 | <geekosaur> | % x=5; f a b = x where {x = 1}; f 2 3 |
| 19:03:00 | <yahb2> | <interactive>:39:31: error: ; Parse error: module header, import declaration ; or top-level declaration expected. |
| 19:03:26 | <geekosaur> | mm, I think ghci does not handle that syntax, it's a bit hacky in pretending to be a top level |
| 19:03:49 | <[exa]> | the ; might belong into the braces |
| 19:03:55 | <geekosaur> | I can reproduce in a local ghci |
| 19:04:18 | <[exa]> | uh wait that's toplevels |
| 19:04:39 | <monochrom> | yahb2 is ghci, so if yahb2 says syntax error, so will ghci. |
| 19:04:57 | <monochrom> | lambdabot though is of course a little bit different. |
| 19:05:10 | <institor> | % :load System.Process |
| 19:05:10 | <yahb2> | <no location info>: error: ; module ‘System.Process’ cannot be found locally ; Failed, no modules loaded. |
| 19:05:10 | <blomberg> | geekosaur:i want to know whether it in local scopes if i reassign x will it work even thogh globally there is x |
| 19:05:16 | <institor> | % :load Control.Monad.State.Lazy |
| 19:05:16 | <yahb2> | <no location info>: error: ; module ‘Control.Monad.State.Lazy’ cannot be found locally ; Failed, no modules loaded. |
| 19:05:34 | <blomberg> | institor:you know i hates monads don't |
| 19:05:34 | <geekosaur> | why wouldn't it? |
| 19:05:37 | <monochrom> | You can't use :load on packaged modules. |
| 19:06:04 | <yushyin> | blomberg: monochrom suggested to try it out and see (locally) |
| 19:06:14 | <monochrom> | It's "import" or ":module +" for packages modules, ":load" for source-code-sitting-right-here modules. |
| 19:06:14 | <geekosaur> | > let x = 5; f a b = x where { x = 1 }; in f 2 3 |
| 19:06:16 | <lambdabot> | 1 |
| 19:06:25 | <institor> | % :module +System.Process |
| 19:06:25 | <yahb2> | <no output> |
| 19:06:28 | <geekosaur> | > let x = 5; f a b = x where { x = 1 }; in f 2 3 + x |
| 19:06:29 | <lambdabot> | 6 |
| 19:06:34 | <institor> | % callCommand "mount" |
| 19:06:35 | <yahb2> | tmpfs on / type tmpfs (rw,nosuid,nodev,relatime,size=10240k,mode=755,uid=1000,gid=1001,inode64) ; /dev/sda1 on /bin type ext4 (ro,nosuid,nodev,relatime,discard) ; /dev/sda1 on /usr/bin type ext4 (r... |
| 19:06:53 | <blomberg> | geekosaur: y=x ; x is globally defined so it does y = 5; but what if i do x=x ; nnow it will be x=5 ; as it "substitutes" x that's the problem |
| 19:06:59 | <institor> | % callCommand "mount | sed -n '3,$p'" |
| 19:06:59 | <yahb2> | /dev/sda1 on /usr/bin type ext4 (ro,nosuid,nodev,relatime,discard) ; /dev/sda1 on /usr/lib type ext4 (ro,nosuid,nodev,relatime,discard) ; /dev/sda1 on /usr/include type ext4 (ro,nosuid,nodev,relati... |
| 19:07:19 | <geekosaur> | blomberg, `x=x` will be recursively defined |
| 19:07:26 | <geekosaur> | > let x = x in x |
| 19:07:28 | <lambdabot> | *Exception: <<loop>> |
| 19:07:52 | <institor> | % let x = 42 in let x = 69 in print x |
| 19:07:52 | <yahb2> | 69 |
| 19:08:07 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 19:08:09 | <institor> | % callCommand "ls /etc" |
| 19:08:09 | <yahb2> | ls: cannot access '/etc': No such file or directory ; *** Exception: callCommand: ls /etc (exit 2): failed |
| 19:08:23 | <institor> | % callCommand "mount | sed -n '6,$p'" |
| 19:08:23 | <yahb2> | /dev/sda1 on /lib type ext4 (ro,nosuid,nodev,relatime,discard) ; /dev/sda1 on /lib64 type ext4 (ro,nosuid,nodev,relatime,discard) ; /dev/sda1 on /home/tom/.ghcup/bin type ext4 (ro,nosuid,nodev,rela... |
| 19:08:38 | <institor> | % callCommand "ls /home/tom" |
| 19:08:39 | <yahb2> | <no output> |
| 19:08:39 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 19:08:41 | <yushyin> | can we stop this yahb2 spam? oO |
| 19:08:47 | <blomberg> | no no but it does a textual replacement in expressions, so y=x+1 ... and so on |
| 19:09:06 | <institor> | % let x = 42 in let x = x + 2 in print x |
| 19:09:06 | <blomberg> | since x is not a function at the RHS but an expression |
| 19:09:08 | <yahb2> | <timeout> |
| 19:09:12 | <institor> | heh |
| 19:10:58 | <institor> | % callCommand "mount | sed -n '9,$p'" |
| 19:10:58 | <yahb2> | <interactive>:5:1: error: ; Variable not in scope: callCommand :: String -> t |
| 19:11:05 | <institor> | % :module +System.Process |
| 19:11:05 | <yahb2> | <no output> |
| 19:11:07 | <institor> | % callCommand "mount | sed -n '9,$p'" |
| 19:11:07 | <yahb2> | /dev/sda1 on /home/tom/.ghcup/ghc type ext4 (ro,nosuid,nodev,relatime,discard) ; /dev/sda1 on /home/tom/.ghcup/cache type ext4 (ro,nosuid,nodev,relatime,discard) ; /dev/sda1 on /workdir type ext4 (... |
| 19:11:14 | <monochrom> | institor: You should do those in PM. |
| 19:12:53 | <geekosaur> | institor: /query yahb2 |
| 19:13:10 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:13:27 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 19:13:33 | <[exa]> | segfaultfizzbuzz: LLMs are good for languages, not for programs :D |
| 19:14:10 | <monochrom> | That doesn't matter in the long run, based on experience with spreadsheets. |
| 19:14:56 | <[exa]> | rofl |
| 19:15:06 | <monochrom> | Spreadsheets are good for lots of numbers and arithmetic on them. Look how people actually use it for everything else ranging from databases to programming. |
| 19:15:06 | <mauke> | are they good for languages? |
| 19:15:19 | → | hays joins (rootvegeta@fsf/member/hays) |
| 19:16:17 | <monochrom> | Before you know it, people will ignore you when you say "LLMs are good for languages, not for truth and fact-checking". |
| 19:16:42 | <geekosaur> | they aloready do |
| 19:16:50 | <blomberg> | chatGPT is offtopic i have a serious question about recursion |
| 19:17:01 | <mauke> | better ask to ask, first |
| 19:17:10 | <mauke> | </sarcasm> |
| 19:17:52 | <blomberg> | x=5; f a b = x where x=x+1 ; versus |
| 19:18:01 | <blomberg> | x=5; f a b = y where y=x+1 |
| 19:18:29 | <blomberg> | x=5; f a b = x where x=1 |
| 19:18:55 | <mauke> | it's the first one |
| 19:18:59 | <blomberg> | now in these 3 situations in all of them it should behave like an expression, |
| 19:19:00 | <[exa]> | blomberg: in the first case the definition x=5 is neglected; it is equivalent to `z=5; f a b = x where x=x+1` |
| 19:19:20 | <mauke> | none of those are expressions, so I'm not sure what "it" is |
| 19:19:24 | <[exa]> | blomberg: local definitions shadow everything including their own contents |
| 19:19:56 | <monochrom> | Where is the recursion? |
| 19:20:03 | <blomberg> | wow that's dope monochrom x=x+1 |
| 19:20:09 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 19:20:30 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 19:21:05 | <blomberg> | [exa]: so x=x+1 ; the LHS is equiv to a function not a variable |
| 19:21:22 | <blomberg> | but in other cases it was a variable,? |
| 19:21:25 | <[exa]> | blomberg: these are the same, both are values |
| 19:21:28 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 19:21:56 | <mauke> | "a function not a variable" is a category error |
| 19:22:30 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 19:22:40 | <institor> | (\f -> f 42) (+ 2) |
| 19:22:45 | <institor> | % (\f -> f 42) (+ 2) |
| 19:22:45 | <yahb2> | 44 |
| 19:22:48 | <blomberg> | but y=x+1 here x is a substituted value, in x=x+1 => x=5+1 ; you just do "text" replacement |
| 19:23:23 | <blomberg> | [exa]:if the RHS of x=x+1 is a value then it will do substitution x=5+1 |
| 19:23:40 | <mauke> | I don't know of any Haskell implementation that does text replacement |
| 19:23:45 | <integral> | if you're doing text replacement, they you need to know that sometimes you have to rename variables |
| 19:23:47 | <mauke> | functions are values |
| 19:23:49 | <yushyin> | whatever this 'text' replacment is, it is not the semantic of the haskell language |
| 19:23:52 | <blomberg> | the x is "calling it's previous definition as a function" |
| 19:24:05 | <blomberg> | that function call is occuring ; so x is a function!! |
| 19:24:11 | <probie> | No, because the `x` that is referred to on the LHS in `x=x+1` is the one you're currently defining (i.e the one on the RHS), not one in an outer scope. Bindings in Haskell are recursive, there is no separate `letrec` |
| 19:24:14 | <[exa]> | blomberg: unevaluated values are values too |
| 19:24:51 | <erisco> | blomberg, sounds like you're working with some Haskell code? |
| 19:24:53 | <blomberg> | integral: you are right |
| 19:25:02 | × | danza__ quits (~francesco@151.44.164.112) (Remote host closed the connection) |
| 19:25:12 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 19:25:21 | <probie> | > let ones = 1:ones in take 10 ones |
| 19:25:23 | <lambdabot> | [1,1,1,1,1,1,1,1,1,1] |
| 19:25:26 | → | danza__ joins (~francesco@151.44.164.112) |
| 19:25:29 | <blomberg> | but it's scope is outer; integral look at previous conversation, so it wasn't predefined in the local scope |
| 19:26:11 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 19:26:12 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 19:26:13 | <blomberg> | probie: ones is a function not a variable |
| 19:26:24 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Tschüss) |
| 19:27:16 | <probie> | blomberg: It's not a function. It's a (lifted) value |
| 19:27:27 | <blomberg> | the actual reason i got it; it's because of reassignment as integral said, it looks like that so it's made a functional call |
| 19:27:31 | <monochrom> | Can we disagree on a more important question instead? |
| 19:28:11 | <integral> | I don't think what I said was very relevant |
| 19:28:30 | <blomberg> | integral what's your take on it |
| 19:28:45 | <blomberg> | it looked like a reassignment hence the issue |
| 19:29:09 | <mauke> | thank god you already know haskell so we don't have to argue over basics |
| 19:29:20 | <blomberg> | but x=10 ; too looks like reassignment and that is surprisingly not prohibited |
| 19:29:21 | × | danza__ quits (~francesco@151.44.164.112) (Remote host closed the connection) |
| 19:29:31 | <probie> | blomberg: is x a function in `x = 1 + 2`? |
| 19:29:35 | <yushyin> | it's not reassignment, lol |
| 19:29:45 | → | danza__ joins (~francesco@151.44.164.112) |
| 19:29:57 | <blomberg> | mauke:? is that sarcasam or you just saying that i know |
| 19:29:57 | <erisco> | blomberg, what code were you working on that lead you to join #haskell? I'd like to take a look at it |
| 19:30:08 | <mauke> | blomberg: heavy sarcasm |
| 19:30:42 | <monochrom> | "fundamentals of FP" |
| 19:31:00 | <integral> | variable binding isn't much like assignment at all, imho |
| 19:31:01 | <institor> | :28:12 institor | blomberg: i recommend reading the book "Learn You a Haskell" |
| 19:31:03 | <institor> | :28:35 institor | speaking of fundamentals... |
| 19:31:05 | <monochrom> | There is a reason I brought up "armchair philosophers" a while ago. |
| 19:31:09 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 19:32:06 | <institor> | wow that was an hour ago |
| 19:32:08 | <institor> | time to go |
| 19:34:19 | <blomberg> | yushyin: x is not a function in `x = 1 + 2` |
| 19:34:54 | <blomberg> | but if something does recursion like in `x = x + 1` instead all i get is heavy sarcasm from monochrom |
| 19:35:09 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 258 seconds) |
| 19:35:10 | <blomberg> | monochrom: is a bad man |
| 19:36:22 | <blomberg> | yushyin: integral [exa] if something does recursion isn't it a function |
| 19:36:26 | <yushyin> | the `x` in `x = x + 1` is `x = x + 1` but it doesn't have the type of a function |
| 19:36:43 | <[exa]> | blomberg: no |
| 19:37:05 | <[exa]> | blomberg: you never saw recursive values in python? |
| 19:37:27 | <blomberg> | [exa]:i have ?? only function do those in python |
| 19:37:37 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 19:37:54 | <mauke> | > let { ones = 1 : ones } in ones -- as seen before. this is a list, not a function |
| 19:37:55 | <lambdabot> | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... |
| 19:37:56 | <[exa]> | blomberg: ok and why is that? |
| 19:37:59 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 19:38:14 | <blomberg> | then what is the type in x=x+1 |
| 19:38:26 | <mauke> | Int |
| 19:38:30 | <blomberg> | what determines a function type in haskell |
| 19:38:48 | <geekosaur> | having parameters |
| 19:38:54 | <blomberg> | right |
| 19:39:29 | <geekosaur> | in the case of `x=x+11`, the type is resolved as Integer because of the `+1` and type defaulting |
| 19:39:37 | <blomberg> | that's what i was thinking but it's just in haskell, x=x+1 undergoes recursion so outside haskell it's a function... using logic , it's a language thing |
| 19:39:57 | <mauke> | I don't know any language where 'x=x+1' is a function |
| 19:41:02 | <blomberg> | mauke: your list example was good |
| 19:41:20 | <[exa]> | blomberg: what I wanted to say, in python the values are super restricted so you need recursion. In haskell the values can recurse themselves without being actual functions. The intermediate step (something that behaves like a function but is already parameterless value) is called a thunk |
| 19:41:20 | <blomberg> | ones was a list of 1,1, so yeah |
| 19:41:32 | → | pavonia joins (~user@user/siracusa) |
| 19:41:38 | <[exa]> | blomberg: suggest googling the 'thunk' concept, I think wiki has a good article on that |
| 19:41:45 | <blomberg> | [exa]: great point |
| 19:41:47 | <mauke> | don't need thunks for recursive data |
| 19:42:04 | <blomberg> | it's like BNF grammar recursion |
| 19:42:22 | <mauke> | const struct node x = { 42, &x }; // is a perfectly cromulent C definition |
| 19:42:41 | <EvanR> | hey look, OOP |
| 19:42:47 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 19:42:52 | × | robbert-vdh quits (~robbert@robbertvanderhelm.nl) (Server closed connection) |
| 19:42:54 | <institor> | don't insult C like that |
| 19:43:17 | → | robbert-vdh joins (~robbert@robbertvanderhelm.nl) |
| 19:43:27 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 19:43:45 | <monochrom> | don't insult OOP like that >:) |
| 19:44:17 | <mauke> | don't. |
| 19:44:25 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 19:44:26 | <geekosaur> | let's insult both at once? I give you Xt |
| 19:45:06 | <[exa]> | blomberg: other view, to have something "unevaluated" in python you need a parameterless function to keep it from evaluating until you call it. In haskell, parameterless function are indistinguishable from values, and because of laziness you don't hit the problem with having to keep it explicitly unevaluated. |
| 19:45:30 | × | danza__ quits (~francesco@151.44.164.112) (Ping timeout: 246 seconds) |
| 19:45:56 | <[exa]> | blomberg: apart of that, functions are values too, and to keep the dictionary useful people call "values that can accept parameters" functions |
| 19:46:11 | <[exa]> | blomberg: please try to use this ^ haskell naming in #haskell channel :] |
| 19:48:28 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 19:54:59 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 19:59:49 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 20:00:38 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 20:02:52 | <blomberg> | x |x<2=1;|otherwise = 2; this is another case in which it's returning without arguments and "looks" superficially like a function |
| 20:03:15 | <mauke> | that ; is technically wrong |
| 20:03:24 | <mauke> | but yes |
| 20:04:06 | <[exa]> | blomberg: yeah, a thunk which evaluates forever |
| 20:04:52 | <blomberg> | this one doesn't |
| 20:05:10 | × | billchenchina quits (~billchenc@2a0c:b641:7a2:320:ee3e:47ca:6070:d71a) (Quit: Leaving) |
| 20:05:16 | <[exa]> | blomberg: how come? |
| 20:05:29 | <mauke> | because neither 1 nor 2 loops |
| 20:05:35 | <mauke> | er |
| 20:05:38 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 20:05:39 | <mauke> | no, I'm wrong |
| 20:05:40 | <blomberg> | it does |
| 20:05:49 | <mauke> | sorry, I misread the guard |
| 20:05:56 | <blomberg> | mauke:i realized before you... this show i know haskell |
| 20:06:06 | <yushyin> | wow |
| 20:06:07 | <monochrom> | I once wrote some code like that and it took me 5 minutes to realize why it hanged. |
| 20:06:08 | geekosaur | *eyeroll* |
| 20:06:17 | <[exa]> | haskell = learned |
| 20:06:18 | <[exa]> | next! |
| 20:06:20 | <mauke> | You rolled a 3. |
| 20:06:36 | <EvanR> | *raises hand* why does it loop what is this shenanigan |
| 20:06:56 | <mauke> | EvanR: let x = if x < 2 then 1 else 2 |
| 20:07:19 | <EvanR> | oh |
| 20:07:50 | <monochrom> | OK I'm in good company. :) |
| 20:07:53 | <EvanR> | x=1 and x=2 both solve it! |
| 20:08:34 | <EvanR> | haskell is broken |
| 20:08:39 | <mauke> | UP TACK |
| 20:08:57 | <EvanR> | that too |
| 20:09:42 | <monochrom> | Actually Ralf Hinze noticed and pointed out the connection between non-termination and having more than one solutions. |
| 20:09:57 | × | jackneill__ quits (~Jackneill@20014C4E1E101A00392465011B960A73.dsl.pool.telekom.hu) (Ping timeout: 245 seconds) |
| 20:10:30 | <geekosaur> | "the following sentence is true. the preceding sentence is false." |
| 20:12:09 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 20:13:07 | <blomberg> | x=5; f a b = (g x) ; x=1 ; --after calling (g x) function can i assign x via some haskell syntax and hopefully get an error |
| 20:13:50 | <blomberg> | the above code is a semantic wish to first call g x as a parameter and then assign x |
| 20:14:28 | <mauke> | "can i assign" <- no |
| 20:14:33 | <mauke> | this is haskell |
| 20:14:51 | × | cafkafk_ quits (~cafkafk@fsf/member/cafkafk) (Ping timeout: 246 seconds) |
| 20:15:02 | × | [_________] quits (~oos95GWG@user/oos95GWG) (Server closed connection) |
| 20:15:12 | <EvanR> | in before blomberg does exactly that in GHCI proving you all wrong! |
| 20:15:17 | <mauke> | heh |
| 20:15:21 | → | [_________] joins (~oos95GWG@user/oos95GWG) |
| 20:15:21 | <geekosaur> | that looks like something which ghci would accept because it shadows the old `x`, but a compiled program would reject as a redefinition |
| 20:15:29 | <mauke> | EvanR: can't be, they hate monads |
| 20:15:30 | <mauke> | and let |
| 20:15:38 | <geekosaur> | % :set -Werror=name-shadowing |
| 20:15:38 | <yahb2> | <no output> |
| 20:16:05 | <EvanR> | one weird trick to reassign variables, haskell will hate this |
| 20:16:05 | <geekosaur> | % g x = x + 1 |
| 20:16:05 | <yahb2> | <no output> |
| 20:16:13 | → | cafkafk_ joins (~cafkafk@fsf/member/cafkafk) |
| 20:16:16 | <geekosaur> | % x=5; f a b = (g x) ; x=1 |
| 20:16:16 | <yahb2> | <interactive>:41:22: error: ; Multiple declarations of ‘x’ ; Declared at: <interactive>:41:1 ; <interactive>:41:22 |
| 20:16:59 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 244 seconds) |
| 20:17:09 | <int-e> | % x | x <- x = x where x = 42 |
| 20:17:09 | <yahb2> | <interactive>:43:5: error: [-Wname-shadowing, -Werror=name-shadowing] ; This binding for ‘x’ shadows the existing binding ; bound at <interactive>:43:22 ; ; <interactive>:43:22: error: [... |
| 20:17:29 | <mauke> | ; ; |
| 20:18:16 | <geekosaur> | right, not on the same line though (re my getting an actual error) |
| 20:18:24 | <geekosaur> | ghci is a bit weird |
| 20:18:39 | <geekosaur> | :set -wname-binding |
| 20:18:44 | <geekosaur> | % :set -wname-binding |
| 20:18:44 | <yahb2> | Some flags have not been recognized: -wname-binding |
| 20:18:52 | <geekosaur> | % :set -Wno-name-binding |
| 20:18:52 | <yahb2> | <no location info>: warning: [-Wunrecognised-warning-flags] ; unrecognised warning flag: -Wno-name-binding |
| 20:19:03 | <geekosaur> | % :set -wname-shadowinging |
| 20:19:04 | <yahb2> | Some flags have not been recognized: -wname-shadowinging |
| 20:19:11 | <geekosaur> | damn I'm doing good today |
| 20:19:14 | <geekosaur> | % :set -wname-shadowing |
| 20:19:14 | <yahb2> | Some flags have not been recognized: -wname-shadowing |
| 20:19:18 | <blomberg> | x=5; f a b = (g x) ; x=1; -- geekosaur is x=1 outside the function scope.. then x=1 should give an error |
| 20:19:22 | <geekosaur> | % :set -Wno-name-shadowing |
| 20:19:23 | <yahb2> | <no output> |
| 20:19:28 | <monochrom> | Is it -W instead of -w ? |
| 20:19:34 | <monochrom> | heh ok |
| 20:20:01 | <geekosaur> | I was thinking like gcc where -W makes it a warning and -w makes it not a warning, but ghc uses -Wno- instead |
| 20:20:14 | <geekosaur> | just trying to save a couple characters |
| 20:21:22 | <blomberg> | if inside a function i call (g x) can i then reassign x as it was the first assignment in the local scope |
| 20:21:54 | <geekosaur> | but once you are outside the function you are back in the global scope, where x is already defined so you get an error |
| 20:22:09 | <geekosaur> | [09 20:16:16] <yahb2> <interactive>:41:22: error: ; Multiple declarations of ‘x’ ; Declared at: <interactive>:41:1 ; <interactive>:41:22 |
| 20:22:15 | <mauke> | "can i then reassign" <- no, this is haskell |
| 20:22:46 | <blomberg> | mauke:inside the function after feeding x as a parameter to g which is some other function |
| 20:22:50 | <geekosaur> | if you do it on multiple lines, though, it "works" because the new "x" shadows the old one. but "f" still uses the value that was in scope at the time |
| 20:22:58 | <EvanR> | > let x = 4 in let x = 5 in x |
| 20:22:59 | <lambdabot> | 5 |
| 20:23:04 | <blomberg> | it is language dependent behaviour |
| 20:23:15 | <mauke> | blomberg: we don't have assignment |
| 20:23:18 | <mauke> | except in class |
| 20:23:56 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 20:25:16 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 248 seconds) |
| 20:28:42 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 20:30:42 | <blomberg> | mauke: then what do you have if not assignment |
| 20:31:02 | <mauke> | binding |
| 20:31:53 | <geekosaur> | which is read-only, unlike assignment: once bound, forever it has that value |
| 20:32:30 | <Rembane> | This makes it possible to use equational reasoning which is quite useful. |
| 20:33:17 | → | libertyprime joins (~libertypr@203.96.203.44) |
| 20:34:04 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 20:35:23 | <EvanR> | x = 4 is an equation |
| 20:35:24 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 20:35:48 | <EvanR> | unlike in C |
| 20:36:06 | <mauke> | still directional, though. can't say 4 = x |
| 20:36:21 | <EvanR> | > let 4 = 5 in 4 |
| 20:36:22 | <lambdabot> | 4 |
| 20:36:30 | <EvanR> | you're right |
| 20:36:35 | <EvanR> | I think |
| 20:36:43 | <mauke> | > let 4 = x in x |
| 20:36:44 | <lambdabot> | x |
| 20:36:52 | <EvanR> | makes sense |
| 20:37:14 | <EvanR> | > let 4 = 4 in 4 |
| 20:37:15 | <lambdabot> | 4 |
| 20:37:20 | <EvanR> | :thumbsup: |
| 20:38:03 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 20:39:09 | <blomberg> | so inside a function if i make another functional call (g x) but use x as a parameter and then bind x=1; will it work |
| 20:39:34 | <EvanR> | depends on what you mean by "and then" |
| 20:39:36 | <integral> | "and then"? |
| 20:39:51 | <blomberg> | use where or some trick |
| 20:39:51 | × | libertyprime quits (~libertypr@203.96.203.44) (Ping timeout: 248 seconds) |
| 20:40:02 | <EvanR> | it's also trivially testable by you |
| 20:40:16 | <blomberg> | but i don't have ghci |
| 20:40:24 | <mauke> | there's online REPLs |
| 20:40:43 | <monochrom> | There is https://play.haskell.org/ |
| 20:40:48 | <mauke> | https://tio.run/#haskell |
| 20:40:48 | <blomberg> | ahh |
| 20:41:51 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 20:42:25 | <EvanR> | or private message lambdabot |
| 20:42:32 | <blomberg> | so functional syntax doesn't allow binding after a nested functional call like inside f there is g |
| 20:42:57 | <blomberg> | and after (g x) x=1 |
| 20:43:02 | <EvanR> | > sqrt(let x = sqrt 2 in x) |
| 20:43:03 | <lambdabot> | 1.189207115002721 |
| 20:43:26 | <blomberg> | via some trick using where |
| 20:43:33 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 20:45:00 | <blomberg> | EvanR:inside function f ; not (f ( ...)) not inside arguments |
| 20:45:07 | <blomberg> | > sqrt(2) |
| 20:45:09 | <lambdabot> | 1.4142135623730951 |
| 20:45:25 | <blomberg> | why is this prefix notation working |
| 20:45:31 | <mauke> | > (sqrt)2 |
| 20:45:32 | <lambdabot> | 1.4142135623730951 |
| 20:45:44 | <blomberg> | ok |
| 20:45:46 | <mauke> | the parentheses are redundant but harmless |
| 20:46:20 | <int-e> | > sqrt 2 -- you have this, with extra (redundant) parentheses |
| 20:46:21 | <lambdabot> | 1.4142135623730951 |
| 20:46:23 | <mauke> | the syntax for function application is putting two terms next to each other |
| 20:46:32 | <int-e> | > ((sqrt) (2)) |
| 20:46:34 | <lambdabot> | 1.4142135623730951 |
| 20:46:35 | int-e | shrugs |
| 20:47:38 | <monochrom> | > sqrt$2 |
| 20:47:39 | <lambdabot> | 1.4142135623730951 |
| 20:47:49 | <monochrom> | "spreadsheet syntax" |
| 20:48:10 | <integral> | > sqrt `id` 2 |
| 20:48:11 | <lambdabot> | 1.4142135623730951 |
| 20:48:13 | <int-e> | > sqrt (1 + 1) -- I'd actually never omit this space except for silly things (obfuscation and golfing) |
| 20:48:18 | <lambdabot> | 1.4142135623730951 |
| 20:49:01 | <monochrom> | You can save some space and be like sqrt`id`2, too |
| 20:49:14 | <int-e> | To avoid the overlap with the f(x,y,z) function application syntax in various other languages that Haskell doesn't have. |
| 20:49:17 | <mauke> | > sqrt1+1 |
| 20:49:18 | <monochrom> | One more example: |
| 20:49:18 | <lambdabot> | 1.4142135623730951 |
| 20:49:25 | <monochrom> | > length"abc" |
| 20:49:26 | <lambdabot> | 3 |
| 20:49:37 | <EvanR> | ok that missing space really derailed everything thanks blomberg |
| 20:49:59 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 20:50:10 | <mauke> | can't be derailed if you never were on track.jpg |
| 20:50:32 | <int-e> | is this why cars are so popular |
| 20:50:33 | <monochrom> | What is there to derail? |
| 20:51:27 | → | ulysses4ever joins (~artem@2601:249:4380:8950:f474:e3f8:9806:671) |
| 20:51:27 | × | artem quits (~artem@2601:249:4380:8950:f474:e3f8:9806:671) (Read error: Connection reset by peer) |
| 20:51:46 | <blomberg> | what is there to thank, unless it's a joke |
| 20:54:25 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:55:02 | <blomberg> | EvanR: did you mean derail the conversation ? |
| 20:55:31 | <blomberg> | i am always on track |
| 20:56:53 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 20:59:38 | <blomberg> | x=5;f a b = z+x where z=(g x) x=1 ; -- can i do that |
| 21:00:19 | → | artem joins (~artem@73.145.240.162) |
| 21:00:38 | <blomberg> | x=5;f a b = z+x where x=1 z=(g x) ; -- order reversed |
| 21:01:09 | <EvanR> | try it and see |
| 21:01:19 | <mauke> | .code.tio.hs:4:6: error: Variable not in scope: g |
| 21:01:22 | <blomberg> | i mean is it functional the first one |
| 21:01:26 | <blomberg> | conceptually |
| 21:01:33 | <mauke> | blomberg: https://tio.run/##y0gszk7Nyfn/v8LWlCtNIVEhScFWoUq7gktBoTwjtSgVSFfZaqQrVGgCWRW2hlxcuYmZeUA1RaklpUV5Chqa//8DAA |
| 21:01:39 | <blomberg> | since i called x as a parameter but didn't assign it |
| 21:01:59 | × | ulysses4ever quits (~artem@2601:249:4380:8950:f474:e3f8:9806:671) (Ping timeout: 246 seconds) |
| 21:02:01 | <EvanR> | your code doesn't even compile |
| 21:02:12 | <EvanR> | fix it and try again |
| 21:04:14 | <blomberg> | g a = a; x=5;f a b = z+x where z=(g x) x=1 -- [1 of 1] Compiling Main ( .code.tio.hs, .code.tio.o ) |
| 21:04:14 | × | artem quits (~artem@73.145.240.162) (Read error: Connection reset by peer) |
| 21:04:16 | <blomberg> | Linking .bin.tio ... |
| 21:04:28 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 21:04:51 | <blomberg> | main = return () --what's that |
| 21:04:57 | <blomberg> | is it repl specific |
| 21:05:11 | <mauke> | that's the main program |
| 21:05:17 | <geekosaur> | it's because tio is not actually a repl, it rquires a program |
| 21:05:19 | <mauke> | tio isn't a repl |
| 21:05:27 | <blomberg> | so let me guess, it loops to main start of the file |
| 21:05:33 | <mauke> | wat |
| 21:05:35 | <geekosaur> | so if you're just testing to see if something compiles you must supply a dummy program that does nothing |
| 21:05:57 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 21:06:06 | → | wroathe joins (~wroathe@50.205.197.50) |
| 21:06:06 | × | wroathe quits (~wroathe@50.205.197.50) (Changing host) |
| 21:06:06 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:07:24 | × | cptaffe quits (~ZNC@99-47-99-155.lightspeed.ltrkar.sbcglobal.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 21:07:56 | <blomberg> | https://tio.run/##DYqxDoAgDAX3fsUbIU5qHPsxmBQwIgNqbPh57HR3yeVwn1LKGAkBjEDKG0Xz3apPSsCXpYmxs0tQb6Y8k4tYsHq6wlFtbfK8rcL5MX4 |
| 21:08:14 | → | cptaffe joins (~ZNC@2600:1700:f08:111f::18e7) |
| 21:08:44 | <mauke> | you can't just put a random expression in a file like that |
| 21:08:52 | <mauke> | a haskell file is a module. a module is a sequence of declarations |
| 21:09:07 | × | _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
| 21:09:15 | <blomberg> | Parse error: module header, import declaration ; -- i didn't import anything |
| 21:09:34 | <mauke> | exactly |
| 21:09:42 | <mauke> | if you did, it wouldn't be an error |
| 21:10:02 | <blomberg> | ?? |
| 21:10:26 | <mauke> | the full message reads: "module header, import declaration or top-level declaration expected." |
| 21:10:45 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 21:10:46 | <blomberg> | what's the fix |
| 21:10:46 | <mauke> | meaning, you can only put those three things at the top level of a module |
| 21:10:53 | <mauke> | depends on what you were trying to do |
| 21:11:03 | <geekosaur> | I thought you claimed to know Haskell |
| 21:11:05 | <blomberg> | it's called not helping |
| 21:11:17 | <blomberg> | ofc i know everything except fixing it |
| 21:11:30 | <mauke> | oh, then you won't need my help |
| 21:11:35 | <mauke> | and here I almost sent you https://tio.run/##DYo7CoAwEAX7PcUrDVYqlnuYFfLDGCQKLrl83GpmYJI8py9ljAgBQ0h5p2B@WPVZCfiSb97YeYpQZ6a8EF2Sqz13y/XFFLBic2P8 |
| 21:12:58 | × | cptaffe quits (~ZNC@2600:1700:f08:111f::18e7) (Client Quit) |
| 21:13:53 | → | cptaffe joins (~ZNC@99-47-99-155.lightspeed.ltrkar.sbcglobal.net) |
| 21:14:31 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 21:15:16 | <blomberg> | thx for your |
| 21:15:18 | <blomberg> | main = print (f 2 3) |
| 21:15:46 | <blomberg> | isn't that repl code or in real haskell file too it works |
| 21:15:55 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 21:16:50 | <EvanR> | a cool guy move is to import your module into ghci then type: main |
| 21:16:54 | <EvanR> | to run your program from ghci |
| 21:17:08 | <EvanR> | redefining and shadowing main stops you from doing that |
| 21:17:49 | <EvanR> | don't be uncool |
| 21:18:19 | <blomberg> | hey i can return z+x but why not the list [z x] |
| 21:18:33 | <blomberg> | https://tio.run/##y0gszk7Nyfn/P10hUcFWIZGrwtbUgCsNyEkCcqOrFCpiuRQUyjNSi1KBdJWtRrpCha6RgSaQU2FraMzFlZuYmQdUWVCUmVeioJGmYKRgrPn/PwA |
| 21:18:55 | <EvanR> | [z,x] |
| 21:19:01 | <EvanR> | [1,2,3,4] |
| 21:19:15 | <EvanR> | z x is function application |
| 21:19:38 | <blomberg> | ahh sorry i learnt haskell perfectly with your answer |
| 21:20:00 | × | cptaffe quits (~ZNC@99-47-99-155.lightspeed.ltrkar.sbcglobal.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 21:20:05 | × | acidjnk quits (~acidjnk@p200300d6e7072f47b0cfe67efeb6b056.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 21:20:51 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 21:20:55 | × | stites quits (~stites@130.44.147.204) (Ping timeout: 248 seconds) |
| 21:21:04 | → | stites joins (~stites@2607:fb91:dcf:4896:22a5:6d79:f786:b171) |
| 21:21:14 | → | cptaffe joins (~ZNC@2600:1700:f08:111f::18e7) |
| 21:25:00 | <blomberg> | the crazy part in haskell is i can do z=(g x) first then x=13 and it works as if order doesn't matter |
| 21:25:04 | <blomberg> | that's like nuts |
| 21:25:45 | × | adamCS quits (~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com) (Server closed connection) |
| 21:25:49 | <blomberg> | it's like it's running simultaneously |
| 21:26:01 | → | adamCS joins (~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com) |
| 21:27:38 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 21:27:59 | <blomberg> | where does it simultaneously |
| 21:28:28 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:28:40 | <geekosaur> | order does not in fact matter; bindings are solved as a group |
| 21:28:42 | <blomberg> | i was expect x to be fetched from the outer scope |
| 21:28:50 | <geekosaur> | that never happens |
| 21:29:00 | <blomberg> | is it a functional thing that bindings are nuts |
| 21:29:06 | <blomberg> | and now it's fucked |
| 21:29:30 | <blomberg> | geekosaur: it happens if no bindings for x exist |
| 21:29:47 | <geekosaur> | a binding exists, it just textually follows |
| 21:29:58 | <geekosaur> | bindings are solved as a group, not in some kind of order |
| 21:29:59 | <EvanR> | defining stuff out of order is a feature in many languages |
| 21:30:25 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 21:30:49 | <blomberg> | could it be in order and be pure FP |
| 21:31:25 | <geekosaur> | you could write them in order, sure. the question is, what order would you use with mutually recursive functions/values? |
| 21:31:48 | <blomberg> | geekosaur: if a binding exists then that's a reassignment |
| 21:31:57 | <geekosaur> | at least one of them has to be used before being defined, if you process them in textual order |
| 21:32:04 | <geekosaur> | there is no reassignment |
| 21:32:39 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 21:33:52 | <blomberg> | how could order of mutually recursive functions be different |
| 21:34:15 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 21:34:56 | <geekosaur> | that's for you to answer (literally, it's what I asked you: "the question is, …") |
| 21:35:28 | <blomberg> | my code is not mutually recursive |
| 21:35:34 | <blomberg> | no idea what code you had in mind |
| 21:36:10 | <geekosaur> | I was explaining why haskell has no order in definitions |
| 21:36:29 | <geekosaur> | you could not write mutually recursive definitions if it did |
| 21:36:52 | <blomberg> | yes, i couldn't grasp and imagine it myself what you are saying |
| 21:37:29 | × | fendor quits (~fendor@2a02:8388:1640:be00:c785:45ab:c70:9d3f) (Remote host closed the connection) |
| 21:37:36 | <EvanR> | > let onezero = 1:zeroone; zeroone = 0:onezero in onezero |
| 21:37:37 | <lambdabot> | [1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0... |
| 21:37:58 | <EvanR> | > let onezero = 1:zeroone; zeroone = 0:onezero in zeroone |
| 21:37:59 | <lambdabot> | [0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1... |
| 21:38:40 | <geekosaur> | note thatthe above works because of (1) laziness (2) both `onezero` and `zeroone` produce a partial result before recursing |
| 21:38:40 | <EvanR> | > let onezero = 1:zeroone; zeroone = 0:onezero in zipWith (+) onezero zeroone |
| 21:38:42 | <lambdabot> | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... |
| 21:39:10 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 21:39:14 | <int-e> | > iterate (1-) 0 |
| 21:39:16 | <lambdabot> | [0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1... |
| 21:39:31 | <geekosaur> | this is the secret to productive self- or mutual recursion in Haskell |
| 21:39:51 | × | leah2 quits (~leah@vuxu.org) (Ping timeout: 260 seconds) |
| 21:39:56 | <EvanR> | godammit geekosaur you told him the secret |
| 21:40:42 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 21:40:57 | <EvanR> | and (3) you don't have to write the definitions in order, because here you can't |
| 21:42:33 | <blomberg> | but it's true only inside where outside it, how can i use x even before defined!! |
| 21:43:08 | <geekosaur> | you're still stuck on stuff having to be defined in order. did we not just tell you why that doesn't work? |
| 21:43:15 | <blomberg> | where z=(g x) x=13 |
| 21:43:25 | → | superryn joins (~superryn@47.186.178.98) |
| 21:43:33 | <blomberg> | imagine z=(g x); x=13 |
| 21:44:00 | <EvanR> | javascript has the same thing, kind of |
| 21:44:22 | <EvanR> | you can define stuff later, after it's used |
| 21:44:36 | <geekosaur> | as long as it's defined in the same group of bindings |
| 21:45:19 | <geekosaur> | well, that's not true, in a haskell source file you can put something at the bottom and the thing using it at the top, the compiler sorts it out |
| 21:45:27 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 21:45:37 | <geekosaur> | why should you the programmer have to care? let the compiler figure it out |
| 21:45:43 | <EvanR> | also many tutorials and explainers do the same thing. Talk about something before it's defined or explained |
| 21:46:02 | <EvanR> | sometimes saying "which will be covered in more detail below" or some such |
| 21:46:16 | <blomberg> | this is fucked it's making a fucking call before i even defined x |
| 21:46:42 | <EvanR> | your notion of time is defined by the orientation of your monitor? |
| 21:46:48 | <EvanR> | interesting |
| 21:46:56 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 21:47:34 | <EvanR> | gaming rig time machine |
| 21:49:26 | <geekosaur> | there are very, very few things in haskell which require you to stick to some specific order |
| 21:49:53 | <geekosaur> | aside from things like template haskell where it's run while the source file is being read so only the stuff above the splice is known yet |
| 21:50:17 | <geekosaur> | but for most things the compiler reads the whole file and then figures out how it all fits together |
| 21:50:35 | <geekosaur> | the programmer should not have to do that busywork, that's what we have computers for 🙂 |
| 21:51:04 | <EvanR> | blomberg, python and ruby are odd ones out here, because they equate definitions with running actual code to store references in things |
| 21:51:14 | × | blomberg quits (~default_u@59.99.23.99) (Ping timeout: 258 seconds) |
| 21:51:18 | <EvanR> | most languages ... |
| 21:51:51 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 21:53:16 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 248 seconds) |
| 21:54:22 | × | coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
| 21:55:17 | <geekosaur> | it's a distinction between "scripting languages" which evaluate as they go and "compiled languages" (not the best term, but the most common one here) which treat an entire source file as a group and can therefore build up pieces that are out of order |
| 21:56:44 | <institor> | javascript is compiled |
| 21:56:49 | <geekosaur> | ("compiled languages" there is a bad term because there's also "interpreted" vs. "compiled", but there are interpreted languages which still work on a source-file-unit basis and compiled languages which nevertheless evaluate in source file order) |
| 21:57:06 | <EvanR> | also javascript definitions can be out of order |
| 21:57:11 | × | stites quits (~stites@2607:fb91:dcf:4896:22a5:6d79:f786:b171) (Read error: Connection reset by peer) |
| 21:57:17 | <EvanR> | so not a contradiction! |
| 21:57:30 | <geekosaur> | it's all quite complicated how things like this interact |
| 21:57:32 | → | stites joins (~stites@2603:3005:b69:4100:afa0:f7be:6ecd:53f2) |
| 21:57:33 | × | mhatta quits (~mhatta@www21123ui.sakura.ne.jp) (Remote host closed the connection) |
| 21:57:40 | <geekosaur> | and even then there are various exceptions 🙂 |
| 21:57:47 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 21:58:35 | × | nek0 quits (~nek0@2a01:4f8:222:2b41::12) (Server closed connection) |
| 21:58:46 | → | mhatta joins (~mhatta@www21123ui.sakura.ne.jp) |
| 21:58:49 | → | nek0 joins (~nek0@2a01:4f8:222:2b41::12) |
| 21:59:18 | <yushyin> | well, that was an interesting episode of #haskell |
| 21:59:31 | <geekosaur> | in particular, while haskell is generally compiled, there are two different ways to interpret it: with something like hugs or runghc, or ghci / ghc -e |
| 21:59:32 | <yushyin> | in a way |
| 22:01:27 | × | Pixi` quits (~Pixi@user/pixi) (Ping timeout: 255 seconds) |
| 22:01:40 | <institor> | yushyin: yes special midnight horror edition |
| 22:01:50 | × | stites quits (~stites@2603:3005:b69:4100:afa0:f7be:6ecd:53f2) (Ping timeout: 246 seconds) |
| 22:02:14 | → | stites joins (~stites@2607:fb91:dcf:4896:22a5:6d79:f786:b171) |
| 22:02:31 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:03:56 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 22:07:20 | <superryn> | exit |
| 22:07:23 | <superryn> | oops |
| 22:07:28 | × | superryn quits (~superryn@47.186.178.98) (Quit: leaving) |
| 22:10:31 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 22:12:03 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 22:15:36 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 22:22:02 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 22:23:58 | × | stites quits (~stites@2607:fb91:dcf:4896:22a5:6d79:f786:b171) (Read error: Connection reset by peer) |
| 22:24:35 | → | stites joins (~stites@130.44.147.204) |
| 22:26:33 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:26:54 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 22:27:09 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds) |
| 22:28:01 | × | cptaffe quits (~ZNC@2600:1700:f08:111f::18e7) (Quit: ZNC 1.8.2 - https://znc.in) |
| 22:28:52 | → | cptaffe joins (~ZNC@99-47-99-155.lightspeed.ltrkar.sbcglobal.net) |
| 22:30:30 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 22:31:19 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 22:31:25 | → | caryhartline joins (~caryhartl@168.182.58.169) |
| 22:32:48 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 22:33:27 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 248 seconds) |
| 22:35:07 | → | Frodeaux joins (~Frodeaux@wsip-98-173-195-105.sb.sd.cox.net) |
| 22:37:03 | → | aaronv joins (~aaronv@user/aaronv) |
| 22:39:06 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 22:39:21 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:40:08 | × | Frodeaux quits (~Frodeaux@wsip-98-173-195-105.sb.sd.cox.net) (Quit: Client closed) |
| 22:40:51 | → | Frodeaux joins (~Frodeaux@wsip-98-173-195-105.sb.sd.cox.net) |
| 22:43:55 | × | Frodeaux quits (~Frodeaux@wsip-98-173-195-105.sb.sd.cox.net) (Client Quit) |
| 22:45:19 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 22:47:45 | <EvanR> | Oh cool, for those who object to sqrt(2) in haskell, I just noticed you can do sqrt (2) in C |
| 22:48:18 | <geekosaur> | gnu style |
| 22:50:31 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 22:52:34 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 22:52:34 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 22:52:34 | → | wroathe joins (~wroathe@user/wroathe) |
| 22:53:47 | → | powderhorn joins (~powderhor@207-153-12-54.static.fttp.usinternet.com) |
| 22:55:27 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 22:57:01 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 23:02:02 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 23:04:34 | × | sinbad quits (~sinbad@user/sinbad) (Quit: Leaving.) |
| 23:05:42 | → | leah2 joins (~leah@vuxu.org) |
| 23:06:22 | × | dcoutts quits (~duncan@82-69-94-207.dsl.in-addr.zen.co.uk) (Ping timeout: 258 seconds) |
| 23:07:03 | → | ulysses4ever joins (~artem@2607:fb91:2f55:c08c:f474:e3f8:9806:671) |
| 23:08:31 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 23:12:06 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds) |
| 23:13:39 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 23:14:17 | → | privacy joins (~privacy@47.219.84.6) |
| 23:14:19 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 23:15:07 | × | Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Server closed connection) |
| 23:15:07 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 23:16:39 | → | Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius) |
| 23:18:19 | → | dcoutts joins (~duncan@82-69-94-207.dsl.in-addr.zen.co.uk) |
| 23:19:24 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
| 23:20:27 | → | artem joins (~artem@172.58.147.188) |
| 23:20:27 | × | ulysses4ever quits (~artem@2607:fb91:2f55:c08c:f474:e3f8:9806:671) (Read error: Connection reset by peer) |
| 23:23:40 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 23:23:49 | → | jargon_ joins (~jargon@184.101.67.95) |
| 23:24:15 | × | jargon quits (~jargon@174-22-199-178.phnx.qwest.net) (Ping timeout: 246 seconds) |
| 23:26:04 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 23:27:12 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving) |
| 23:28:48 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 246 seconds) |
| 23:31:12 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 23:31:15 | × | mauke quits (~mauke@user/mauke) (Server closed connection) |
| 23:31:25 | → | mauke joins (~mauke@user/mauke) |
| 23:31:35 | × | Franciman quits (~Franciman@mx1.fracta.dev) (Server closed connection) |
| 23:31:39 | → | Pixi joins (~Pixi@user/pixi) |
| 23:31:49 | → | Franciman joins (~Franciman@mx1.fracta.dev) |
| 23:31:51 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 23:33:47 | × | cptaffe quits (~ZNC@99-47-99-155.lightspeed.ltrkar.sbcglobal.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 23:34:41 | → | cptaffe joins (~ZNC@2600:1700:f08:111f::18e7) |
| 23:37:03 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 23:37:07 | <segfaultfizzbuzz> | can i make a haskell which has no exceptions |
| 23:39:18 | <EvanR> | undefined is in the standard so I think not officially |
| 23:42:35 | → | goober joins (~goober@90-231-13-185-no3430.tbcn.telia.com) |
| 23:42:36 | × | hiredman quits (~hiredman@frontier1.downey.family) (Remote host closed the connection) |
| 23:43:23 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 23:43:35 | × | V quits (~v@ircpuzzles/2022/april/winner/V) (Server closed connection) |
| 23:43:53 | → | V joins (~v@ircpuzzles/2022/april/winner/V) |
| 23:44:29 | <geekosaur> | you can make a haskell which can't catch exceptions, though, as that's not in the standard |
| 23:44:50 | <geekosaur> | and indeed there have been two different exception handling systems in ghc |
| 23:45:59 | × | segfaultfizzbuzz quits (~segfaultf@12.172.217.142) (Ping timeout: 248 seconds) |
| 23:46:08 | <geekosaur> | the old one is completely gone at this point but you can find it documented in the standard libs for old ghc versions (say 6.6) |
| 23:46:18 | <geekosaur> | and of course they pinged out |
| 23:46:48 | → | hrberg joins (~quassel@171.79-160-161.customer.lyse.net) |
| 23:47:56 | <goober> | I'm having trouble using aeson for a stack project: https://pastebin.com/raw/k0m6i0rc |
| 23:48:13 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 240 seconds) |
| 23:48:55 | <goober> | i meant to say package.yaml there |
| 23:51:06 | → | segfaultfizzbuzz joins (~segfaultf@12.172.217.142) |
| 23:52:46 | → | bilegeek joins (~bilegeek@2600:1008:b066:6cf0:4183:58f7:fd04:6b0d) |
| 23:54:00 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds) |
| 23:54:46 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 23:54:54 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 23:57:10 | → | ulysses4ever joins (~artem@c-73-103-90-145.hsd1.in.comcast.net) |
| 23:58:14 | <geekosaur> | looks like aeson is using an old version of th-abstraction, because https://hackage.haskell.org/package/th-abstraction-0.6.0.0/docs/Language-Haskell-TH-Datatype.html#t:DatatypeVariant shows TypeData as a constructor |
All times are in UTC on 2023-09-09.