<< 15-03-2014 >>

00:01:31*Sorcy joined #nimrod
00:07:04*Amrykid_ joined #nimrod
00:07:04*Araq_bnc joined #nimrod
00:07:27*Demos is now known as 6JTAACZNU
00:07:35*psquid joined #nimrod
00:07:35*vendethiel joined #nimrod
00:07:35*Demos joined #nimrod
00:08:53*zielmicha_ joined #nimrod
00:09:04*dom96_ joined #nimrod
00:09:05NimBotAraq/Nimrod devel 762e343 Dominik Picheta [+0 ±2 -0]: PFuture[void] now works.... 3 more lines
00:10:29*noam__ quit (Ping timeout: 246 seconds)
00:10:31*Ycros quit (Read error: Connection reset by peer)
00:10:32*6JTAACZNU quit (Ping timeout: 246 seconds)
00:10:33*Amrykid quit (Ping timeout: 246 seconds)
00:10:34*Araq quit (Ping timeout: 246 seconds)
00:10:35*zielmicha quit (Ping timeout: 246 seconds)
00:10:35*dom96 quit (Ping timeout: 246 seconds)
00:10:37*dom96_ is now known as dom96
00:10:37*dom96 quit (Changing host)
00:10:37*dom96 joined #nimrod
00:11:21*Demos_ joined #nimrod
00:12:42*cark joined #nimrod
00:13:28BitPuffindom96: no? :O :D
00:13:39*Demos quit (Ping timeout: 240 seconds)
00:14:10dom96BitPuffin: https://github.com/Araq/Nimrod/blob/devel/tests/async/tasyncawait.nim
00:18:12*io2 quit ()
00:21:27*zielmicha joined #nimrod
00:21:27*eigenlicht joined #nimrod
00:26:10*zielmicha_ quit (*.net *.split)
00:26:11*psquid quit (*.net *.split)
00:26:11*vendethiel quit (*.net *.split)
00:26:12*zielmicha is now known as zielmicha_
00:26:23*vendethiel joined #nimrod
00:29:44EXetoCdom96: "var x = Test()" should that even work?
00:29:47*DAddYE quit ()
00:31:56EXetoCso is that async code parallelized?
00:34:14dom96Don't know and no.
00:35:50*psquid joined #nimrod
00:39:23EXetoCI don't think it should work, but I guess we'll find out soon
00:44:54*cark quit (Write error: Connection reset by peer)
00:45:01*cark joined #nimrod
00:51:02*Matthias247 quit (Read error: Connection reset by peer)
01:06:55EXetoCdom96: so it basically allows the user to easily choose between sync/async, right?
01:07:31dom96EXetoC: no. It allows the user to write async code without callback hell.
01:07:56dom96It's similar to how sync code looks, but it's not strictly the same.
01:08:23EXetoCthat seems more important. I don't have any experience with this, but some article mentioned that
01:08:47EXetoCand is the intended behavior to have it compile regardless of whether or not 'await' is used at some point?
01:09:36dom96You don't have to use await. But then your code will keep running so it's a bit pointless.
01:10:01dom96var fut = readLine(...)
01:10:12dom96echo fut.read # oh no, we don't have the value yet.
01:10:17dom96# -> Error.
01:10:31dom96var line = await readLine(...)
01:10:33dom96echo line
01:10:51dom96Second line won't be executed until readLine completes.
01:11:12EXetoCyeah I figured that out by editing the test
01:17:58dom96good night
01:18:24Skrylarmeep
01:18:54EXetoCsneaky long 'when' blocks :>
01:20:00*Mordecai joined #nimrod
01:20:19*Mordecai is now known as Guest90434
01:20:49*psquid quit (Ping timeout: 240 seconds)
01:28:07*Sorcy is now known as Ycros
01:29:26BitPuffindom96: in brief?
01:30:37*clovis quit (Quit: clovis)
01:33:18*runvnc joined #nimrod
01:34:55EXetoCBitPuffin: async+await
01:35:43EXetoCin action
01:35:59EXetoCsee tests/asyncio/tasyncawait.nim
01:36:08*q66 quit (Ping timeout: 240 seconds)
01:36:52BitPuffinEXetoC: yeah I know but what's the point of them?
01:40:22*brson_ quit (Quit: leaving)
01:40:32EXetoCBitPuffin: "no. It allows the user to write async code without callback hell." that, apparently
01:45:19*eigenlicht quit (*.net *.split)
01:48:45*q66 joined #nimrod
01:48:45*q66 quit (Changing host)
01:48:45*q66 joined #nimrod
01:51:34*q66 quit (Client Quit)
01:52:20*eigenlicht joined #nimrod
01:53:41*eigenlicht quit (Ping timeout: 246 seconds)
01:55:44*eigenlicht joined #nimrod
02:22:58*flaviu quit (Quit: Leaving.)
02:23:07*flaviu joined #nimrod
02:35:08*BitPuffin quit (Ping timeout: 240 seconds)
03:02:58*eximius joined #nimrod
03:29:14eximiusOkay, nimrod looks really cool... but whose idea was it to allow things like array[4..8, int]. Now it's 4-indexed?!? That's just silly. lol Powerful. But super silly.
03:29:45eximiusHow does that work anyway? converted internally to 0 when it's automagically compiled from C?
03:33:16flaviueximius: most people here are asleep
03:33:39flaviutry asking after 8-9 hours from now
03:34:07eximiusOh? that puts them where.. asia mostly?
03:34:29eximiusNo... then it'd be like 11am (for china at least)
03:34:38EXetoCmany are from Europe
03:34:39flaviuEurope actually
03:34:55eximiusYea, I was slowly moving Westward in my head lol
03:35:07EXetoCeximius: sounds about right. I don't know how else you can do it
03:35:22EXetoCand a couple from the US
03:35:32eximiusI was thrown off cause I have a British friend who is an insomniac so he's usually awake around now anyway.
03:36:36eximiusEXetoC: No clue. It only works with Ordinal types so it's certainly the way I'd think to do it. Otherwise they could have like 4 empty slots that are unusable which would be an incredible oversight.
03:38:44*CARAM joined #nimrod
03:38:54EXetoCthat's highly unlikely. maybe if we had let Rasmus Lerdorf implement it
03:39:33*eximius hears a rushing of air as that reference flies over his head.
03:39:41eximiusWho's that?
03:39:49eximiusOH
03:39:56eximiushahaha
03:40:11flaviueximius: unfortunately, the best way to figure out how its implemented is to C-f array in https://github.com/Araq/Nimrod/blob/devel/compiler/ccgtypes.nim
03:43:10eximiusof ..., tyArray, ... -> result = ctArray
03:43:17eximiusso it's implemented as a ctArray
03:47:07eximiusBah. I don't want to figure this out on the tail end of an 11 hour shift. It's still just a silly, powerful feature.
03:47:14EXetoCit shouldn't be implemented in some weird way, but compile some minimal example in release mode and then check the C sources if you want
03:47:35eximiushm
03:47:59flaviuThat might be easier. Sorry for dumping you in the middle of the compiler :P
03:48:04EXetoCit'll end up in the nimcache directory
03:48:46eximiusflaviu: yea, never had much luck figuring things out that didn't start somewhere :P
03:48:47Demos_I was actually super happy yesterday when I made a off by one error in a matrix multiplication function and got an error at compile time
03:49:14Demos_you usually use the high and low procs for indexing anyway, so the actual indexes dont matter that much
03:49:23EXetoCah, the joy of modern tools
03:50:23eximiusDemos_: can you not use for-in on arrays?
03:50:34EXetoCDemos_: I don't, but I rarely write procs for generic arrays
03:50:51Demos_eximius, sure you can, but sometimes you want to index through it
03:51:00Demos_in particular items returns a T, not a var T.
03:51:36Demos_so if you want to modify the elements you may want to consider using for i in [arr.low..arr.high]
03:53:35eximiushmm. thanks
03:55:43eximiusOkay, yea, for "array[4..10, int]" and "testar[6] = 4" it compiles the assignment to "testar_80007[(6)- 4] = 4;"
03:56:18flaviu full gist: https://gist.github.com/flaviut/a77d85d21e8c6c61c1ee
03:56:20eximiusSo they just subtract the lowerbound... everywhere. which is a compile-time hit, but meh.
03:57:06eximiusyay simultaneous findings!
03:59:59*flaviu quit (Remote host closed the connection)
04:04:10EXetoCwell, runtime, but it'll most likely be optimized out
04:04:56*OrionPK quit (Read error: Connection reset by peer)
04:07:59fowleximius, array[5,t] works
04:09:11eximiusEXetoC: I guess I just assumed pointer arithematic was done compile time if they were both constants.
04:09:18eximiusfowl: what?
04:10:02fowlarray[5,t] works for array[0..5-1,t]
04:10:35eximiusOhh, gotcha. Lovely!
04:10:53eximiusInteresting that they don't put that in the tutorial.
04:11:30renesacit is in the tutorial:
04:11:30renesachttp://build.nimrod-lang.org/docs/tut1.html#arrays
04:11:36EXetoCeximius: well that's the generated C code. the C compiler should optimize out some things, and the Nimrod compiler too, but many optimizations are yet to be implemented
04:12:50eximiusrenesac: weird. I guess I'm reading an outdated or current release version here:http://nimrod-lang.org/tut1.html
04:12:53eximiuswhich doesn't have it.
04:13:05renesacyeah... we really need this version 0.9.4 out...
04:13:41Demos_people tend to use the devel branch, it has more features
04:13:53Demos_and yeah, the c compiler should optimize that out
04:14:02renesacI guess that this notation was introduced after 0.9.2, and the main page reflects that version...
04:18:35*nolan_d joined #nimrod
04:19:08eximiusEXetoC: yea, I was assuming the C compiler would do that at compile time.
04:19:50eximiusthe git version is 9.3, so that's what I'm using.
04:20:27renesacyeah, that will turn in 0.9.4 soon(tm)
04:21:01eximiusanything I should be looking forward to?
04:21:10EXetoCyou'll want to look at http://build.nimrod-lang.org/ and http://build.nimrod-lang.org/docs/manual.html (unlisted) then
04:36:13EXetoCeximius: if only I could remember all the things. see "user defined type classes" and "strong spaces"
04:37:06EXetoCand then there's the await (C#) macro which might end up in 0.9.4
04:39:31EXetoChttp://build.nimrod-lang.org/docs/manual.html#static-t
04:40:03EXetoCthe new VM and closure iterators http://build.nimrod-lang.org/docs/manual.html#first-class-iterators might need some more work
04:41:12EXetoCand about 9000 bug fixes
05:25:02*CARAM quit (Remote host closed the connection)
05:25:11*CARAM joined #nimrod
05:25:12*CARAM quit (Remote host closed the connection)
05:45:43*Araq_bnc is now known as Araq
05:53:59Araqhi eximius welcome. you'll have a hard time to measure that additional '-' operation ;-)
05:56:20Araqplus C may optimize it out completely a[i-4] == (a-4*sizeof(elemType(a))[i]
05:56:48Araqeven if not a constant expression
05:59:29Demos_could get wrapped into the regular indexing arithmatic
06:21:31*zielmicha_ quit (Ping timeout: 264 seconds)
07:02:05*brson joined #nimrod
07:06:45*brson_ joined #nimrod
07:07:20*brson quit (Ping timeout: 264 seconds)
07:11:59*Demos_ quit (Ping timeout: 255 seconds)
07:48:11*grumio2_ joined #nimrod
08:05:41*shodan45 quit (Quit: Konversation terminated!)
08:06:54*Endy joined #nimrod
08:18:52*zielmicha joined #nimrod
08:42:05*grumio2_ quit (Quit: Lost terminal)
08:45:44*q66 joined #nimrod
08:46:02*Endy quit (Ping timeout: 252 seconds)
08:58:03Skrylarbluh. For some reason I've been extremely unproductive for two days
09:03:07*noam__ joined #nimrod
09:03:08*noam_ quit (Ping timeout: 255 seconds)
09:05:18*Matthias247 joined #nimrod
09:20:53*io2 joined #nimrod
09:42:08*brson_ quit (Ping timeout: 264 seconds)
10:14:02*noam__ quit (Ping timeout: 252 seconds)
10:14:21*noam__ joined #nimrod
10:14:24*noam__ quit (Max SendQ exceeded)
10:14:49*noam__ joined #nimrod
10:22:49*lanior joined #nimrod
10:23:21Araqhi lanior welcome
10:23:56*Endy joined #nimrod
10:26:48laniorhi
11:02:13*Matthias247 quit (Read error: Connection reset by peer)
11:16:11*Endy quit (Ping timeout: 252 seconds)
11:17:44EXetoCSkrylar: the world depends on awesome nimrod code, so snap out of it
12:11:32*darkf quit (Quit: Leaving)
12:29:08*Guest90434 quit (Quit: work)
12:35:37*flaviu joined #nimrod
12:41:47*Endy joined #nimrod
13:03:11dom96hello
13:03:45EXetoClo
13:04:51*io2 quit ()
13:12:43laniorAre there any compile-time type reflection capabilities?
13:13:04laniorSomething like http://dlang.org/phobos/std_traits.html
13:17:09Araqyeah, there is a typetraits module and we have AST based macros
13:17:20Araqthe type API is still missing
13:17:38Araqbut now that I got how the design needs to look like, it's easily added
13:17:55Araqbbl
13:20:14*Matthias247 joined #nimrod
13:23:30laniorSounds good
13:24:27laniorCan I resolve string/AST expression in caller scope during macro instantiation?
13:27:12laniorSo if we have some macro backed ORM code like TArticle.get(@slug == slug and @published_at.year == 2013) we can still check field existence and type compatibility
14:11:04*brihat left #nimrod (#nimrod)
14:55:38*EXetoC quit (Ping timeout: 240 seconds)
15:06:48flyxis the gtk nimrod binding autogenerated?
15:23:03*flaviu quit (Ping timeout: 252 seconds)
15:30:23dom96flyx: part of it was autogenerated a long time ago
15:33:07flyxwell I'm in need of an editor for nimrod to get started properly. I thought about adding GtkOSXApplication to the gtk binding so Aporia can be compiled as proper OSX application
15:37:24laniorflyx: try sublime text
15:38:05flyxlanior: already tried that, I think it's awful
15:38:11Matthias247flyx: yep, try sublime with that: https://github.com/Varriount/NimLime
15:38:46flyxI know that sublime can import TextMate themes, but apparently it doesn't work the other way round
15:38:54flyxotherwise I could use TextMate or Chocolat
15:42:17flyxSublime is basically unusable because it doesn't properly support my keyboard layout
15:42:29laniorflyx: NimLime also provides autocompletion and syntax checking
15:42:46flyxthis is an open bug in Sublime but nobody cares
15:43:21Matthias247it's the same for the german layout. But I can adjust the keyboard shortcut settings so that it works
15:43:35flyxsee: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=5382
15:44:05dom96flyx: I'm not sure what GtkOSXApplication is but by all means implement it.
15:47:42flyxdom96: it's basically for getting the window menu bar moved into the standard OSX menu bar, adds support for common OSX shortcuts and add some other things like the ability to add entries to the Dock icon's context menu.
15:49:07*flaviu joined #nimrod
15:49:37flyxit seems like the binding is currently hardcoded to link against the x11 version of gtk, I'll see if I can get it to compile against gtk-quartz for starters
15:52:54*flyx wipes some dust from his gtk-osx toolchain
16:03:57*OrionPK joined #nimrod
16:04:33*lanior left #nimrod (#nimrod)
16:07:09*clovis joined #nimrod
16:08:01dom96flyx: It's possible that Aporia doesn't even compile on Mac OS X :(
16:09:48flyxdom96: we'll see soon enough
16:11:17*ndrei joined #nimrod
16:11:51flyxwin32 and macosx are predefined by the compiler, right?
16:17:22dom96windows and macosx are the symbolds IIRC
16:17:27dom96*symbols
16:20:55*ics joined #nimrod
16:24:35*Amrykid_ is now known as Amrykid
16:26:09OrionPKdo user defined type classes work on anonymous tuples
16:31:46*foodoo joined #nimrod
16:39:38*flaviu quit (Ping timeout: 240 seconds)
16:41:39*Amrykid quit (Changing host)
16:41:39*Amrykid joined #nimrod
17:01:52*BitPuffin joined #nimrod
17:05:19*ndrei quit (Ping timeout: 264 seconds)
17:57:37foodooWhere does Aporia save its .pid file? Aporia claims that there is another instance running even though there isn't.
17:59:00Araqfoodoo: I think it's done via requesting a port number
17:59:08*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
17:59:33Araqyou may need to wait a bit until the OS released this port number again
17:59:48dom96foodoo: Yeah, that's likely a bug. What Araq said.
18:10:16foodooDo you happen to know which port Aporia uses?
18:10:47*Vendethiel- joined #nimrod
18:11:19*vendethiel quit (Ping timeout: 264 seconds)
18:11:43Matthias247In that case use should set SO_REUSEADDR
18:11:56Matthias247for the socket
18:12:06*nolan_d left #nimrod (#nimrod)
18:13:43*ndrei joined #nimrod
18:14:09foodoowell, I'll reboot then
18:14:15*foodoo quit (Quit: Lost terminal)
18:15:03*foodoo joined #nimrod
18:16:58Matthias247foodoo: if the problem is that the socket hangs in TIME_WAIT then it will work after 1-3minutes again
18:18:30foodooDidn't work for me. But I'm also opening TCP sockets in my nimrod program so maybe this causes some problems?
18:23:30Araqpossible
18:23:33Araqwhich OS btw?
18:24:24*Demos joined #nimrod
18:25:20foodooLinux 64bit
18:25:31foodoolet's see if the problem is reproducible...
18:26:09foodoo(will now wait 5 minutes)
18:27:30*rveach_ joined #nimrod
18:33:17*cjvgbh joined #nimrod
18:33:27Araqhi cjvgbh welcome
18:33:53cjvgbhHello there
18:34:33foodoohttp://pastebin.com/dUd2AcAD When I execute this code (with a Jabber server running on 5222) the last line never finishes. If I then close aporia normally, I cannot restart it
18:34:47foodooAnd I get the message "An instance of aporia is already running."
18:35:36foodooThe logfile of the jabber server doesn't say that the connection has been closed (it normally does). So I guess the connection to the Jabber server remains open even though Aporia was closed
18:37:08dom96foodoo: You can change the port in the config file.
18:37:22dom96Should be in ~/.config/aporia/ IIRC
18:37:27dom96brb
18:37:36cjvgbhbtw does nimrod support udp sockets? Is something i have to checkout for each OS ?
18:38:19Araqcjvgbh: I know we support udp sockets but I don't know how to get them :P
18:38:23foodoocjvgbh: I seems so: IPPROTO_UDP from http://nimrod-lang.org/sockets.html#143
18:39:26cjvgbhThanks. Data is a String?
18:40:12*nolan_d joined #nimrod
18:40:44foodoocjvgbh: Which proc are you refering to?
18:41:02cjvgbhThe high level
18:41:31cjvgbhproc recv(socket: TSocket; data: var string; size: int; timeout = - 1): int
18:41:50foodoocjvgbh: data: var string
18:42:07foodootypes are defined after the colon (:)
18:44:01cjvgbhYes, but it seems weird to me. I'm not an expert but in java you receive a packet with a byte array http://docs.oracle.com/javase/7/docs/api/java/net/DatagramPacket.html
18:47:07foodooJava is probably more abstract (and therefore different) than C or Nimrod.
18:47:27*ndrei quit (Quit: Lost terminal)
18:49:06cjvgbhHow is receiving a byte array more abstract than a string? The low level declaras data as a pointer, but is the first time i see this type.
18:49:16cjvgbhpointer to what?
18:49:40cjvgbhWheren can i learn more about this? should i check the source code?
18:51:21*EXetoC joined #nimrod
18:52:18Demosthe pointer type is a pointer to /anything/ like C's void*
18:52:52Demoscould point all the way to kansas :D
18:55:37cjvgbhThat is good, but to what is the pointer pointing?
18:56:01Araqcjvgbh: 'pointer' is simply C's void*
18:59:22*io2 joined #nimrod
19:00:04cjvgbhSorry i'm not used to C.
19:01:35cjvgbhI thought it would put the data into an array. I have to check directly the inside of the pointer? Where can i learn more about pointers in nimrod?
19:01:51Araqcjvgbh: well it's unspecified to what the pointer points to as 'recv' doesn't need to know, it treats it as a pointer to a byte array though
19:02:22Demoscjvgbh, in C pointers and arrays are the same
19:02:26Araqbut if you don't know about 'pointer' you shouldn't use this version of 'recv' ;-)
19:02:46Demosthe arr[i] syntax is short for *(arr + sizeof(*arr) * i)
19:03:06dom96cjvgbh: You can think of string as a ByteArray.
19:03:09cjvgbhAah ok i get it, thanks
19:03:38cjvgbhSo, for example if i want to retreive the second byte received, i'd write data[1] ?
19:03:54cjvgbhwith the high level version i mean
19:03:55dom96yes
19:04:31cjvgbhInteresting. Why it uses a string and not array[int8]? Or whatever.
19:05:15dom96It's more intuitive for text-based protocols.
19:07:28cjvgbhFair enough
19:09:38Demosalso for the low level interface that is probably how C does it
19:09:46Demossince C does not actually have an int8 type
19:09:49Demoswell C89 does not
19:11:08cjvgbhThanks, now everything is clear to me. With java i had some clases to manage different udp connections, but you dont have to deal with pointers directly. Also, where can i learn more about threads?
19:11:14cjvgbhDoes nimrod features actors?
19:12:06dom96http://build.nimrod-lang.org/docs/threads.html
19:12:15dom96http://build.nimrod-lang.org/docs/actors.html
19:12:16Demoscjvgbh, there is an actors module, not sure if it is up to date
19:12:57Demoswell nimrod can let you avoid the use op pointers but sometimes they are just the simplest way to go
19:13:57dom96the low-level version is only useful for optimisation purposes.
19:14:14dom96even though the overhead of the high-level version is probably extremely low anyway
19:14:50dom96Soon all the high-level stuff will be moved to a 'net' module.
19:16:12cjvgbhi'll keep that in mind, thanks.
19:16:46cjvgbhwhy it is neccessary to use the flag --threads:on with threas?
19:21:25Araqdon't use the actors module, it sucks
19:21:54Araqwe'll get much better threading support in 0.9.6
19:22:24Araq--threads:on seems a good idea as threads introduce some overhead
19:24:56cjvgbhNice. I saw you posted about using pattern matching via macros. It is planned to introduce them as a core feature?
19:25:20Araqstdlib and then later we might move it into the core
19:25:27Araqbut it's of low priority
19:29:42cjvgbhOh, another question, now that i have the chance. forward declaration is ugly,i hope there are plans to introduce a work around.
19:30:06cjvgbhI know that is how c++ works (and i suppose c), but nevertheless, ugly.
19:30:47AraqI know how to solve that by now
19:30:58AraqI don't know whether you will like it though
19:31:01Araq;-)
19:31:13cjvgbh:/
19:31:18renesac"template `<<`(x, y: distinct Tinteger): expr = x shl y" <-- is this a good hack around the operator precedence rules?
19:33:14Araqrenesac: template `<<`(a, b: expr): expr = a shl y # good enough, right?
19:33:26Araqalso #!strongSpaces has been implemented
19:33:45renesacI heard streams module is defining a `<<` operator
19:33:50renesacoh
19:34:04Araqstreams will get &= not <<
19:34:13renesachumm, cool
19:34:36Demosyeah, just because C++ uses << does not mean we need to
19:34:54renesacI never liked those << from C++ too
19:35:20renesac&= makes more sense
19:36:20renesac(thought I'm defining that too, but it can probably be through a simple proc with safe overload resolution)
19:47:57cjvgbh"Now please ask the Scala guys whether their form of pattern matching supports exhaustiveness checking" what do you mean by *exhaustiveness checking" ?
19:48:38Araqcase myenum
19:48:50Araqof valueA: baz
19:48:58Araq# error: not all cases are covered
19:49:53cjvgbhWith scala you use the underscore
19:50:10AraqI might add that Ada has that feature since 1980 or something
19:50:54Araqthe underscore is NOT the same at all
19:51:44Araqbtw just checked the scala spec, it doesn't perform exhaustiveness checking afaict
20:00:34cjvgbhb-but they have pattern matching
20:07:04renesac"If the operator ends with = and its relevant character is none of <, >, !, =, ~, ?, it is an assignment operator which has the lowest precedence." <-- so `<<=` will not be interpreted as an assignment operator?
20:07:38renesacor I can use templates to hack around it too?
20:10:08Araqno
20:10:17Araqdidn't think about this
20:10:32Araqbut surely <= is not an assignment operator, right?
20:11:01renesacyeah
20:11:40Araqmaybe shift should be *< and *> instead
20:11:59renesac"template `<<=`*(x, y: expr): expr = x = x shl y" <-- this don't work?
20:12:08Araqit is multiplication like, after all
20:12:11renesachum
20:12:17Araqit does work but precedence is weird
20:13:22renesactemplates can't add parenthesis right...?
20:13:32renesaclike you would do with a C macro...
20:14:26Araqyou can but it's unnecessary
20:15:00renesacI mean: "template `<<=`*(x, y: expr): expr = x = x shl (y)"
20:15:08renesacto have y parsed before
20:15:50Araqyup, doesn't work
20:16:45renesacwell, *> sure is a solid solution, but is kinda ugly, different from everything and harder to type
20:16:51renesac^^"
20:17:13Araq<< means "much smaller than" anyway
20:17:41AraqI am so tired of this "C's syntax is natural" attitude when it certainly wasn't natural when they came up with it
20:17:49renesacyeah, I guess it could be understood that way, if it was not C, Java, etc using it for bitshift
20:18:14renesacwell, it isn't really natural, but it is the standard for that type of thing
20:18:20renesacand has it's advantages
20:19:37Araqwhen I learned C I saw multiplications everywhere
20:20:31Araqlater I made * the export marker (copied it from oberon) and people say "argh, looks like pointers"
20:20:42Araqahh the irony
20:20:50Matthias247:)
20:20:55renesaclol
20:21:23renesacand I'm opposed to changing the export marker symbol
20:21:26renesacbtw
20:21:42renesacmy only problem with it is forgetting it often...
20:22:28cjvgbhi'd prefer + over *
20:23:17renesacyeah, '+' is also fine, but not really different
20:23:47cjvgbhAt least it not resembles a C pointer *trollface*
20:24:36cjvgbhSeems more 'natural'
20:27:21cjvgbhBtw, in java exists the "package-protected" mod, can you achieve something closer to it on nimrod?
20:27:55Matthias247I also wanted that ;)
20:27:59renesacuse include?
20:28:43renesacit's not the same thing, but maybe works for most cases
20:29:05cjvgbhI see, but if everyone can include your code, you loose that protection in some way.
20:29:53renesacwell, they could manually copy-paste anyway
20:30:07renesacit is the same
20:30:20EXetoCcjvgbh: it does resemble the symbol for addition though
20:30:28EXetoCyou can't make everyone happy can you :/
20:30:48Demoscjvgbh, just don't document the packages you dont want people importing, no reason to be super paranoid
20:31:07cjvgbhYou are right, but * resembles multiplication sign and pointer too. + Is used, for example on irc to imply the user has "voice"
20:31:34cjvgbhYou are right, Demos and renesac.
20:31:38EXetoClet's use the unicode poop symbol or something
20:31:47cjvgbhlol
20:34:05foodooI bet Unicode has a crown symbol
20:34:24foodooThat would be a nice prefix for public stuff
20:34:49renesacand the poop symbol for package-protected stuff?
20:35:12foodoo"poop" as in "smelly, better not touch if you are not responsible"?
20:35:19cjvgbhWe can use the symbol U+07F7 ... but it resembles something else ...
20:35:24renesacyeah, sounds good
20:36:54renesachttp://www.charbase.com/1f451-unicode-crown
20:37:25renesacnow we only need to find a fixed-width font that has this symbol!
20:39:23foodooThe *prefix should still be available as a fallback
20:40:46cjvgbhthat would cause much controversy, in other words, free advertising
20:40:57renesacnah, it is ugly compared to that crown
20:41:21cjvgbh"first language to use crown as a access mod, all hail to nimrod"
20:41:52cjvgbhelegance to the extreme
20:42:07Matthias247lol, would somehow be cool
20:43:12cjvgbhI can see how, even having the * as alternative, everyone would use the crown
20:46:35Matthias247everyone who can type it :)
20:47:16cjvgbhWell i must go. Thanks everybody for your help. I hope nimrod gets more recognition, it deserves it (even if it doesn't have pattern matching). See you around.
20:47:19*cjvgbh quit (Quit: Page closed)
20:48:19renesacapril first is close
20:52:25*Demos quit (Ping timeout: 240 seconds)
20:54:18*ics joined #nimrod
21:01:25*foodoo quit (Quit: something is leaking memory...)
21:02:11*RedDevil joined #nimrod
21:02:25*RedDevil is now known as Guest31831
21:04:25Guest31831Hi guys. I need some help as I explore Nimrod again. I need to have a 6000x6000 byte attar and pass a reference to it to a procedure (read only). How would I go about doing that?
21:04:42Guest31831Array that iis.
21:06:00*Mat3 joined #nimrod
21:06:04Mat3hi all
21:06:11Araqjust pass the array to a proc, nimrod doesn't copy it for parameter passing
21:08:51Guest31831Thanks - I will check that out. I new there had to be a simple answer.
21:15:49*Mat3 quit (Quit: Verlassend)
21:17:08*Mat3 joined #nimrod
21:21:18*ScriptDevil joined #nimrod
21:23:39ScriptDevilHi, what does the word Nimrod mean? Also, what is the official Twitter hashtag for it?
21:23:54dom96#nimrodlang
21:24:07dom96Nimrod means "incredibly intelligent person"
21:24:10dom96:P
21:24:17dom96Also, welcome to #nimrod :)
21:24:34ScriptDevilThe does the :p invalidate the meaning described in the previous sentence? :P
21:24:38ScriptDevildom96: Thanks!
21:24:51Mat3hello ScriptDevil
21:24:59ScriptDevilMat3: Hi!
21:25:18ScriptDevilI did not expect the git repo to be over 200MB in size "Receiving objects: 61% (20754/33922), 199.32 MiB | 470 KiB/s"
21:25:19AraqScriptDevil: Nimrod was the first king who also built the tower of Babel.
21:25:28dom96ScriptDevil: Well yeah, i'm kidding heh.
21:25:40Araqthe repo is big because of generated C source code cruft
21:25:42ScriptDevilAraq: Aah. Ok. Babel - languages - metaprogramming, get it.
21:25:55Araqyup
21:26:51ScriptDevilThere seems to be an unrelated #nimrod that is popular in Twitter today. I tweeted with #nimrod, saw the hashtag drowned in some totally off-topic pool of #tags
21:27:30Araqturns out "nimrod" is also an english word ...
21:27:45dom96ScriptDevil: You can also just mention the twitter @nimrodlang.
21:27:57dom96*twitter account
21:28:13ScriptDevilWill follow.
21:29:31dom9644 followers yay
21:29:49ScriptDevil:D *party*
21:30:17dom96And it looks like 100% are real people!
21:31:09ScriptDevilAraq: I am new here, but without sounding too impertinent, why is generated C-code a part of the repo rather than being generated during build? For bootstraping the compiler?
21:31:29Araqyes and it's an artifact really
21:31:47Araqto get rid of it we'll break every single fork though
21:31:56Araq:-/
21:32:32dom96The C sources are required to bootstrap the compiler and they used to present in the main repo. Then they were zipped which made the repo huge.
21:32:43dom96But yeah, getting rid of that will break all forks.
21:32:59dom96And could unleash all sorts of other bad things.
21:35:04ScriptDevilBut 317MB ... :-/ I guess if things have moved on from that, one could start a clean repo. In countries like India, bandwidth and download limits are an issue in several parts (I fortunately have a good connection).
21:35:28ScriptDevilAnyway, let me contribute something tangible before throwing in bike-shed suggestions.
21:35:39Guest31831OK now I have a problem setting the array up for test. Can I pass the array without having the data loaded? See code snipet:
21:36:39Guest31831Actually how do i show a code snipet?
21:36:41dom96ScriptDevil: You can always clone with --depth 1
21:37:34renesacGuest31831, do a gist: https://gist.github.com/
21:37:53renesacor your preferred code pasting site
21:43:41renesacAraq, `*<=` don't work
21:43:43renesachttps://gist.github.com/ReneSac/ee531fb96d6d43b0d1dd
21:45:52renesacI should probably fill a bug
21:46:21renesacit is treated the same as `<<=`
21:48:10Araqrenesac: you mixed up shr and shl for *>=
21:48:31Guest31831Here is the code sniprt: https://gist.github.com/anonymous/9574381
21:48:54renesacohh
21:48:58renesacsorry
21:52:42AraqGuest31831: sorry bad connection here, somebody else needs to help you
21:52:52Mat3hmm, compiling Nimrod indeed is somewhat arcane in my opinion. However the situation is not comparable to langauges like Julia which depend on much more external libraries (and sublibraries which depend on ... some more external libraries)
21:53:16renesacwhy arcane?
21:53:30AraqMat3: things get better once we got 0.9.4 out
21:53:54Mat3renesac: wrong translation, sorry
21:57:37Mat3with »arcane« I mean that compiling Nimrod from the Git repro actualle seem depending on a priour installed, recent Nimrod compiler
21:57:45Mat3^actually
21:58:05Araqgcc depends on gcc too, you know
22:00:24Mat3yes, it's only the Nimrod version build from csources lacks some language features so I still need editing system.nim for compiling koch
22:02:07Araqit's always been this way
22:02:17Araq0.9.0 can't compile 0.9.2
22:02:30Araq0.8.10 can't compile 0.9.0 etc.
22:02:44Araqthe language evolves too fast
22:02:54Mat3I agree
22:03:03Araqhttp://blog.theincredibleholk.org/blog/2012/11/29/a-look-at-gpu-memory-transfer/
22:03:13Araqmight be interesting to you, Mat3
22:03:50Guest31831Thanks Araq. I will try another tact. I seem to be having touuble instantiating the large array. The examples just have literals. I need 6000x6000.
22:04:30Araqso declare the array as a global variable
22:04:47Araqdon't put it on the stack
22:04:49*Endy quit (Ping timeout: 240 seconds)
22:05:07Araqor allocate a seq with newSeq(s, 6000*6000)
22:05:43EXetoCthat sure is big
22:06:14Guest31831How would I do the global variable option?
22:07:03runvnchello
22:07:05Mat3Araq: Thanks
22:07:41runvncIn my httpserver the port doesn't get unbound when I kill the process. so I think I want to trap the signal and then do close() right
22:09:08Matthias247?!? The OS will free all resources (incl. sockets) on application close
22:09:44Araqrunvnc: system.addQuitProc or something like that
22:09:56runvnck thanks I will look that up araq
22:10:10AraqMatthias247: true but ports take a while until the OS cleans them
22:10:51dom96I don't think that will help.
22:11:01Matthias247that's true on unix. But you can set SO_REUSEADDR on server sockets to avoid the problem
22:11:02dom96You need to set SOREUSEADDR on the socket.
22:11:37Matthias247but I also learned that the hard way ;)
22:11:38runvncok I was thinking of using SOREUSEADDR
22:12:06runvncthought maybe people would tell me to unbind the socket but same diff as long I dont need to wait around for the socket
22:12:20runvncI will do soreuseaddr
22:12:35*flaviu joined #nimrod
22:12:36Araqsore-user, yes
22:12:39Matthias247is it a a unix domain socket or an ip socket?
22:13:02runvnctcp
22:13:09Mat3get some sleep, ciao
22:13:17AraqMat3: good night
22:13:19ScriptDevilGood night!
22:13:19*Mat3 quit (Quit: Verlassend)
22:13:24Guest31831Disregard last - got it. Sorry to anoy.
22:13:30Matthias247runvnc: ok, then SO_REUSEADDR is the way to go
22:14:06runvnck is it wrong to just call close on the PAsyncHttpServer in my quit proc though
22:14:07runvncheh
22:14:36Araqbecause it doesn't support closures?
22:15:40Araqaww Aporia doesn't support the unicode crown symbol
22:16:01Araqmaybe my font only supports Klingon
22:16:37flaviuAraq: Scala does support exhaustiveness checking, but only when the class that everything inherits from is marked sealed
22:17:04Araqflaviu: interesting, thanks
22:17:44flaviuIn scala(and in general the jvm), you can mix and match compilation, making it impossible for global extensiveness when a new subtype can be declared in a different compilation
22:17:45Araqthe spec doesn't mention it though. or perhaps I missed it.
22:18:50Araqflaviu: yeah you can reason about Java code as good as you can about Python code.
22:19:15*brson joined #nimrod
22:19:46runvncquitproc is pretty great
22:39:01runvncreuseAddr is in the code I downloaded the other day but not the docs
22:39:29runvncthe docs are generated automatically though right so
22:40:12runvncI assume that automatically will happen when it gets released or something
22:42:58dom96it's in there: http://build.nimrod-lang.org/docs/sockets.html#109
22:45:41runvncoh ok. I was looking on this page at asyncHTTPServer http://nimrod-lang.org/httpserver.html
22:46:02*psquid joined #nimrod
22:46:16runvncanyway the docs match whats in the file exactly so its generated. at first I thought I needed to update something manually but of course that is automatic
22:46:42runvncI mean, the docs don't match the file I downloaded from github, but they were obviously generated from the previous version
22:46:42runvncnvm
22:47:03Araqthe docs have a version number for this reason iirc
22:47:41runvncyeah it does say in the lower left hand corner generated 05-20-2013 I see that now
22:48:07ScriptDevilIs there a nimrod wishlist somewhere?
22:48:13Araqhttp://nimrod-lang.org/lib.html
22:48:23AraqVersion: 0.9.2
22:49:14AraqScriptDevil: I think we've pretty much enumerated every language feature in existance and included it in nimrod or planned to do so
22:49:43Araqbut just ask
22:51:02renesachttps://github.com/Araq/Nimrod/wiki/Feature-suggestions <-- this page exist in the wiki
22:51:58flaviuI really hate the ?: syntax, its really great nimrod has if expressions instead
22:52:10ScriptDevilAraq: Not language features per-se. I can immediately see a few weekend projects. 1. CSS for the nimrod-forums 2. Language support for one or more of those Javascript syntax highlighters for blogs etc.
22:53:15ScriptDevilAraq: Also, library requests, but then...
22:53:31ScriptDevilrenesac: That was pretty much what I was looking for
22:53:43flaviuA code scroll on the home page might help with adoption
22:54:17ScriptDevilflaviu: Isn't there already a "nimrod looks like this"?
22:54:37flaviuA general idea of syntax is nice, but what people really like to see is all the fancy things you can do
22:57:04ScriptDevilflaviu: There is a cookbook suggestion on that wiki/Feature-suggestions. That might actually be what is needed.
22:57:45ScriptDevilHowever, Araq's talk on Infoq was the selling point for me.
22:58:16AraqScriptDevil: interesting. did you understand it?
22:58:35Araqcause I heard I was way too fast and well
22:59:34Araqthe stuff was quite advanced
23:01:04*darkf joined #nimrod
23:01:19Araqflaviu: make it happen, PRs are welcome
23:01:40Araqthe website is generated with nimrod's docgen
23:01:48Araqbut you know that already
23:02:03ScriptDevilAraq: I loved it. I understand hygienic macros from Scheme. The HTML code gen part was neat.
23:02:21ScriptDevilYes, I missed a little towards the end because I was multi-tasking. But it was a pretty good pitch.
23:02:22flaviuSure, I'll start on it as soon as I get my documentation code execution working
23:03:16ScriptDevilI thought nimrod looked very suitable for writing DSLs etc.
23:03:34EXetoCindeedio
23:04:07Araqah lol for me my talk == "Araq shows off partial evaluation"
23:05:50Araqzahary takes the credit for the htmlgen example :-)
23:06:51ScriptDevilAraq: A talk that tried to dumb down a language to "hey, I have a cool python variant that compiles" would have been boring to me. I have spent the last 2 years trying to master Haskell on and off. Never doing so. The technical nature of the talk was what interested me the most.
23:07:24ScriptDevilAraq: Just try avoid getting hit by a bus. That is the only cause for concern now :P
23:08:23Araqthe bus factor is 2 fyi
23:08:43Araqzahary knows the core as well including the GC and all the hard parts in the compiler
23:09:21ScriptDevilAraq: And the concern has been alleviated :D
23:10:41Araqthere are of course others who know the internals quite a bit
23:11:45ScriptDevilI was kidding about the bus-factor part.
23:12:03Araqyou might but we had people here who didn't
23:12:15ScriptDevilThat Dr.Dobbs article had a comment about it.
23:12:30ScriptDevilTrue. But people don't realize that ALL projects had a bus-factor of 1.
23:13:01ScriptDevilBefore people become less cynical and look at the technical merit.
23:13:56ScriptDevilProbably, add it as a fun-line in the /info. "We have a bus-factor that is strictly greater than 1"
23:14:11ScriptDevilSorry. /topic
23:16:00Matthias247I experienced quite a lot of these "bus1" situations
23:16:09Matthias247There was actually never a bus, but the people quit
23:16:10runvncI made a pr to look up the mime type and set content-type in httpserver
23:16:36runvncin case anyone doesnt have enough pr or issues on their mind or something
23:16:40Araqthere are quite some PRs I need to review
23:16:59*CARAM joined #nimrod
23:16:59Araqwill do these when I'm less productive
23:17:20runvncheh
23:17:37Matthias247In most cases there were official second people for the things, but actually they had no clue of how the internals worked ;)
23:18:22dom96Araq won't quit because I won't let him.
23:18:29dom96I'll fly to Germany if I have to.
23:18:32dom96:P
23:18:37ScriptDevilMatthias247: Have seen a few of those too. But this language seems to be gathering steam now, Dr.Dobbs, HN, InfoQ. Would pique the attention of a few.
23:18:48Araqyou should do that anyway
23:19:01dom96true...
23:19:14flaviuScriptDevel: The response on reddit was mediocre though :(
23:19:38Matthias247yes, reddit was bad. But the response on HN was quite good
23:19:51ScriptDevilflaviu: I find reddit better for non-tech things like DOTA2 and wtf
23:19:53dom96When we reach 100 concurrent users on IRC i'll be happy.
23:20:32ScriptDevilBut, the tech channels are more like the tech-channels in 4chan. They come up with epic shit like sleepsort. But then, they are mostly ranters.
23:20:56ScriptDevilbtw, I will make a post on lobste.rs if there isn't one yet.
23:21:24dom96Yeah, you should. Lobste.rs looks interesting.
23:21:42renesacthere seems to be two posts about nimrod there
23:22:09renesachttps://lobste.rs/s/j1yj2n/consider_the_nimrod_programming_language/comments/nnw6ej
23:22:12renesac<-- latest one
23:22:13Matthias247some reddit links are really interesting. But others like the "I managed to get Helllo world working in C and it was that hard" blog posts are nothing but spam
23:22:31Araqflaviu: I think we did well on reddit.
23:22:55Araqbut my definition of "well" comes from experience
23:23:39Matthias247I really enjoyed that one yesterday: http://www.youtube.com/watch?v=UzyoT4DziQ4&feature=share
23:23:47runvncIf I get 5 upvotes on reddit I consider it a success. I have low standards for reddit though
23:23:47Matthias247Didn't knew he was also an entertainer ;)
23:24:33flaviurunvnc: Have you tried googling "cute kitten" and posting it on r/aww?
23:24:57runvncflaviu: lol
23:26:08runvncyeah I guess I usually try to go for unknown/controversial/not yet popular ideas on big subreddits
23:27:27runvncwhich is not generally wildly successful but oh well
23:27:43dom96I wonder if Wikipedia will allow a Nimrod article now.
23:28:01renesacdom96: I would say: wait for 0.9.4
23:28:16renesacas this would be the third attempt...
23:28:38*lanior joined #nimrod
23:28:57runvncI got very irritated the other night with wikipedia and wrote a paragraph on a talk page to one of the editors who rejected the wikipedia article
23:28:58renesachopefully some biggish news take this nimrod release...
23:29:16renesac*news site
23:29:40dom96I think we should submit to slashdot upon the 0.9.4 release.
23:29:49runvncsaying all the reasons he should fix his mistake and put up the one on dom96's draft page
23:29:55runvncI assume he ignored it but I havent looked
23:30:41ScriptDevilhttps://lobste.rs/s/oochao/nimrod_a_new_approach_to_metaprogramming < If you want to add osmething and are on lobste.rs
23:31:01dom96runvnc: oh cool. I don't think it will do much good though, many people argued on HN with wikipedia editors about it and nothing good came of it.
23:31:30runvncwell that guy wrote me back and said he wasn't an admin anymore oh well
23:34:30runvnche referred me to administrator's noticeboard and that refers me to deletion review https://en.wikipedia.org/wiki/Wikipedia:Deletion_review
23:34:54runvncI am not going to post anything on there because I think that may be a strategic consideration and I don't want to interfere but that might be an option to pursue
23:35:35Skrylar...
23:35:38SkrylarOkay, Wikipedia is a joke.
23:36:11SkrylarIt may be weirdly popular and held in high regard, but the peer review / editor process over there is a Cool Kids Club
23:36:34SkrylarCome back with a million dollar sponsorship and they'll give you an article the next day :P
23:37:40runvncLOL seems like it.. I got an impression that something was up when I tried to correct the WebGL article which had a bunch of made up security concern stories written by an editor who worked for Microsoft
23:38:11runvncbut wikipedia is important anyway
23:39:20runvnceventually someone fixed that webgl article
23:39:23SkrylarYeah there was a lot of anger in some of the conspiracy theory sites about the editor process; it basically went, "We don't expect you to tell it like we think it is, but we expect you to put our citations up in a neutral fashion" to which editors responded, "Lol no, we do whatever we want" :/
23:39:43SkrylarIts basically "how many editors can you rally to the talk page vs. how many editors can they rally" in any given topic
23:40:17ScriptDevilSkrylar: I have a friend who works at Wikimedia. Let me ask him what the criterion is.
23:40:36Skrylarrunvnc: as you probably have a new account and haven't sworn the oath of the 80,000 word wikipedia law, you are obviously a shill and we should trust the microsoft guy more. :)
23:40:37ScriptDevilAFAIK, it had some issues with Paid editing
23:40:49ScriptDevilBut they did spend a lot of time removing those edits.
23:41:01ScriptDevilAnd banning the authors if IIRC
23:41:37SkrylarI'm not impressed with their detective work at wikimedia though.
23:41:56Skrylari read over the logs of one of those arguments and someone accused the editor of being a sockpuppet, and they expected him to "prove he wasn't" which is great legal sense
23:42:09runvncThere was no actual thing on Wikipedia saying he worked for Microsoft. Its just he was putting in a bunch of FUD that the "security firm" hired by Microsoft wrote, and his IP was located right next to MS headquarters.
23:42:10SkrylarInstead of having the accusor prove he was
23:42:27runvncI looked up his IP address with a geo thing, which isn't precise, but it sure looked like the same spot
23:42:29SkrylarI wouldn't be surprised if the paid editing policy didn't receive similar enforcement
23:47:16Skrylarnow to your regularly scheduled meep
23:49:14ScriptDevilOk, even urbandictionary isn't helping me here. Way OT. What is meep?
23:49:52Skrylarmeep is a noise
23:50:39Skrylarhttps://www.youtube.com/watch?v=MiNoAFMmnwE
23:51:11SkrylarI'm surprised its not in urbandictionary; roadrunner used to be somewhat famous
23:51:56ScriptDevilSkrylar: It says "meep means anything you want it to mean"
23:52:00ScriptDevilThat wasn't too useful.
23:53:36*renesac left #nimrod ("Leaving")
23:53:48*renesac joined #nimrod
23:57:19SkrylarI usually say 'meep' instead of anything when i pop in IRC, though they're also usually talking about compiler internals
23:57:24Skrylartoday i said words instead
23:57:25Skrylar:P
23:59:00*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)